[PATCH] drivers: mtd: mtdcore: Fix build warning when CONFIG_MTD_CHAR is not defined
Fabio Estevam
festevam at gmail.com
Wed Jan 11 22:25:04 EST 2012
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 at freescale.com>
---
drivers/mtd/mtdcore.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 6ae9ca0..b265188 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -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 */
--
1.7.1
More information about the linux-mtd
mailing list