summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdsuper.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-07-27 17:59:19 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-07-27 17:59:19 +0200
commit800f65bba8d2030b3fef62850e203f9f176625a8 (patch)
tree6507c4fe7a0826c253b4afb29375ab306a0fd9c8 /drivers/mtd/mtdsuper.c
parentrt2x00: Fix regression for rt2500pci (diff)
parentBluetooth: Support for Atheros AR300x serial chip (diff)
downloadlinux-800f65bba8d2030b3fef62850e203f9f176625a8.tar.xz
linux-800f65bba8d2030b3fef62850e203f9f176625a8.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6
Conflicts: drivers/net/wireless/iwlwifi/iwl-commands.h
Diffstat (limited to 'drivers/mtd/mtdsuper.c')
-rw-r--r--drivers/mtd/mtdsuper.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/mtd/mtdsuper.c b/drivers/mtd/mtdsuper.c
index 7c003191fca4..bd9a443ccf69 100644
--- a/drivers/mtd/mtdsuper.c
+++ b/drivers/mtd/mtdsuper.c
@@ -152,18 +152,12 @@ int get_sb_mtd(struct file_system_type *fs_type, int flags,
DEBUG(1, "MTDSB: mtd:%%s, name \"%s\"\n",
dev_name + 4);
- for (mtdnr = 0; mtdnr < MAX_MTD_DEVICES; mtdnr++) {
- mtd = get_mtd_device(NULL, mtdnr);
- if (!IS_ERR(mtd)) {
- if (!strcmp(mtd->name, dev_name + 4))
- return get_sb_mtd_aux(
- fs_type, flags,
- dev_name, data, mtd,
- fill_super, mnt);
-
- put_mtd_device(mtd);
- }
- }
+ mtd = get_mtd_device_nm(dev_name + 4);
+ if (!IS_ERR(mtd))
+ return get_sb_mtd_aux(
+ fs_type, flags,
+ dev_name, data, mtd,
+ fill_super, mnt);
printk(KERN_NOTICE "MTD:"
" MTD device with name \"%s\" not found.\n",