Skip to content

Commit

Permalink
mtd: mtd in mtd_release is unused without CONFIG_MTD_CHAR
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Denis V. Lunev authored and David Woodhouse committed Apr 19, 2009
1 parent 0882e8d commit 2fdb114
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/mtd/mtdcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2fdb114

Please sign in to comment.