diff options
author | Denis V. Lunev <den@openvz.org> | 2009-04-12 03:14:46 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-04-19 03:59:17 -0400 |
commit | 2fdb11449ca82f4f1907fce4929df4e0bd267c50 (patch) | |
tree | bc6d13b955707b15abb85918a84f0bf7d891aa8c /drivers/mtd | |
parent | 0882e8dd3aad33eca41696d463bb896e6c8817eb (diff) |
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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/mtdcore.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index fdd6ae859397..051b4d4ed21f 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c | |||
@@ -48,11 +48,11 @@ static LIST_HEAD(mtd_notifiers); | |||
48 | */ | 48 | */ |
49 | static void mtd_release(struct device *dev) | 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 | /* remove /dev/mtdXro node if needed */ | 53 | /* remove /dev/mtdXro node if needed */ |
54 | if (MTD_DEVT(mtd->index)) | 54 | if (index) |
55 | device_destroy(mtd_class, MTD_DEVT(mtd->index) + 1); | 55 | device_destroy(mtd_class, index + 1); |
56 | } | 56 | } |
57 | 57 | ||
58 | static ssize_t mtd_type_show(struct device *dev, | 58 | static ssize_t mtd_type_show(struct device *dev, |