Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fdb1144 authored by Denis V. Lunev's avatar Denis V. Lunev Committed by David Woodhouse
Browse files

mtd: mtd in mtd_release is unused without CONFIG_MTD_CHAR



drivers/mtd/mtdcore.c: In function 'mtd_release':
drivers/mtd/mtdcore.c:51: warning: unused variable 'mtd'

[akpm: make it actually build]
Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 0882e8dd
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -48,11 +48,11 @@ static LIST_HEAD(mtd_notifiers);
 */
static void mtd_release(struct device *dev)
{
	struct mtd_info *mtd = dev_to_mtd(dev);
	dev_t index = MTD_DEVT(dev_to_mtd(dev)->index);

	/* remove /dev/mtdXro node if needed */
	if (MTD_DEVT(mtd->index))
		device_destroy(mtd_class, MTD_DEVT(mtd->index) + 1);
	if (index)
		device_destroy(mtd_class, index + 1);
}

static ssize_t mtd_type_show(struct device *dev,