2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-30 08:04:13 +08:00

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: 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>
This commit is contained in:
Fabio Estevam 2012-01-12 01:25:04 -02:00 committed by David Woodhouse
parent 70d5098a4b
commit 335a5f409e

View 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 */