Commit 071f4924 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.infradead.org/users/dwmw2/random-2.6

* git://git.infradead.org/users/dwmw2/random-2.6:
  [MTD] Fix !CONFIG_BLOCK compile for mtdsuper.c
  firmware: silence __fw_modbuild and __fw_modinst 'Nothing to be done' messages
parents d9c56619 f1136d02
...@@ -125,8 +125,11 @@ int get_sb_mtd(struct file_system_type *fs_type, int flags, ...@@ -125,8 +125,11 @@ int get_sb_mtd(struct file_system_type *fs_type, int flags,
int (*fill_super)(struct super_block *, void *, int), int (*fill_super)(struct super_block *, void *, int),
struct vfsmount *mnt) struct vfsmount *mnt)
{ {
#ifdef CONFIG_BLOCK
struct block_device *bdev; struct block_device *bdev;
int mtdnr, ret; int ret, major;
#endif
int mtdnr;
if (!dev_name) if (!dev_name)
return -EINVAL; return -EINVAL;
...@@ -178,6 +181,7 @@ int get_sb_mtd(struct file_system_type *fs_type, int flags, ...@@ -178,6 +181,7 @@ int get_sb_mtd(struct file_system_type *fs_type, int flags,
} }
} }
#ifdef CONFIG_BLOCK
/* try the old way - the hack where we allowed users to mount /* try the old way - the hack where we allowed users to mount
* /dev/mtdblock$(n) but didn't actually _use_ the blockdev * /dev/mtdblock$(n) but didn't actually _use_ the blockdev
*/ */
...@@ -190,22 +194,25 @@ int get_sb_mtd(struct file_system_type *fs_type, int flags, ...@@ -190,22 +194,25 @@ int get_sb_mtd(struct file_system_type *fs_type, int flags,
DEBUG(1, "MTDSB: lookup_bdev() returned 0\n"); DEBUG(1, "MTDSB: lookup_bdev() returned 0\n");
ret = -EINVAL; ret = -EINVAL;
if (MAJOR(bdev->bd_dev) != MTD_BLOCK_MAJOR)
goto not_an_MTD_device;
major = MAJOR(bdev->bd_dev);
mtdnr = MINOR(bdev->bd_dev); mtdnr = MINOR(bdev->bd_dev);
bdput(bdev); bdput(bdev);
if (major != MTD_BLOCK_MAJOR)
goto not_an_MTD_device;
return get_sb_mtd_nr(fs_type, flags, dev_name, data, mtdnr, fill_super, return get_sb_mtd_nr(fs_type, flags, dev_name, data, mtdnr, fill_super,
mnt); mnt);
not_an_MTD_device: not_an_MTD_device:
#endif /* CONFIG_BLOCK */
if (!(flags & MS_SILENT)) if (!(flags & MS_SILENT))
printk(KERN_NOTICE printk(KERN_NOTICE
"MTD: Attempt to mount non-MTD device \"%s\"\n", "MTD: Attempt to mount non-MTD device \"%s\"\n",
dev_name); dev_name);
bdput(bdev); return -EINVAL;
return ret;
} }
EXPORT_SYMBOL_GPL(get_sb_mtd); EXPORT_SYMBOL_GPL(get_sb_mtd);
......
...@@ -50,8 +50,12 @@ PHONY += __fw_install __fw_modinst FORCE ...@@ -50,8 +50,12 @@ PHONY += __fw_install __fw_modinst FORCE
.PHONY: $(PHONY) .PHONY: $(PHONY)
__fw_install: $(installed-fw) __fw_install: $(installed-fw)
__fw_modinst: $(installed-mod-fw) __fw_modinst: $(installed-mod-fw)
@:
__fw_modbuild: $(addprefix $(obj)/,$(mod-fw)) __fw_modbuild: $(addprefix $(obj)/,$(mod-fw))
@:
FORCE: FORCE:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment