[PATCH 2/5] mtd: fix compiler warning

Sascha Hauer s.hauer at pengutronix.de
Thu Apr 5 02:53:46 EDT 2012


Fixes:

drivers/mtd/core.c: In function 'mtd_ioctl':
drivers/mtd/core.c:122:24: warning: unused variable 'ecc' [-Wunused-variable]

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/mtd/core.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index ccc5c26..7bc0a0f 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -119,7 +119,9 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
 	int ret = 0;
 	struct mtd_info *mtd = cdev->priv;
 	struct mtd_info_user *user = buf;
+#if (defined(CONFIG_NAND_ECC_HW) || defined(CONFIG_NAND_ECC_SOFT))
 	struct mtd_ecc_stats *ecc = buf;
+#endif
 	struct region_info_user *reg = buf;
 
 	switch (request) {
-- 
1.7.9.5




More information about the barebox mailing list