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: Denis V. Lunev <den@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

authored by Denis V. Lunev and committed by David Woodhouse 2fdb1144 0882e8dd

+3 -3
+3 -3
drivers/mtd/mtdcore.c
··· 48 48 */ 49 49 static void mtd_release(struct device *dev) 50 50 { 51 - struct mtd_info *mtd = dev_to_mtd(dev); 51 + dev_t index = MTD_DEVT(dev_to_mtd(dev)->index); 52 52 53 53 /* remove /dev/mtdXro node if needed */ 54 - if (MTD_DEVT(mtd->index)) 55 - device_destroy(mtd_class, MTD_DEVT(mtd->index) + 1); 54 + if (index) 55 + device_destroy(mtd_class, index + 1); 56 56 } 57 57 58 58 static ssize_t mtd_type_show(struct device *dev,