mtd: mtdcore: Fix build warning when CONFIG_MTD_CHAR is not defined
authorFabio Estevam <festevam@gmail.com>
Thu, 12 Jan 2012 03:25:04 +0000 (01:25 -0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 26 Mar 2012 23:11:16 +0000 (00:11 +0100)
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: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/mtdcore.c

index 9a9ce71a71fcbb2e004c0c0eb2f9a680202ee30d..de96865b4f9636cdc8e80a9506b9769ea6cbbf19 100644 (file)
@@ -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 */