提交 335a5f40 编写于 作者: F Fabio Estevam 提交者: David Woodhouse

mtd: mtdcore: Fix build warning when CONFIG_MTD_CHAR is not defined

Fix the following build warning:

drivers/mtd/mtdcore.c: In function ‘mtd_release’:
drivers/mtd/mtdcore.c:110: warning: unused variable ‘mtd’

This happens when neither CONFIG_MTD_CHAR nor CONFIG_MTD_CHAR_MODULE are defined.
Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 70d5098a
......@@ -107,7 +107,7 @@ static LIST_HEAD(mtd_notifiers);
*/
static void mtd_release(struct device *dev)
{
struct mtd_info *mtd = dev_get_drvdata(dev);
struct mtd_info __maybe_unused *mtd = dev_get_drvdata(dev);
dev_t index = MTD_DEVT(mtd->index);
/* remove /dev/mtdXro node if needed */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册