diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-02-18 21:34:49 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-02-18 21:34:49 +0000 |
commit | 8a7049730fca6962f5918f63b4e229c0d57cb22b (patch) | |
tree | b02d1233e0343b31750a6bbe4fcb95e1e465b0b1 /target/linux/generic-2.6/patches-2.6.32 | |
parent | 4c1e6a7e39fb2a2e425223e0aca48624ae3936db (diff) | |
download | mtk-20170518-8a7049730fca6962f5918f63b4e229c0d57cb22b.zip mtk-20170518-8a7049730fca6962f5918f63b4e229c0d57cb22b.tar.gz mtk-20170518-8a7049730fca6962f5918f63b4e229c0d57cb22b.tar.bz2 |
fix a compile error in block2mtd when compiled as module
SVN-Revision: 19709
Diffstat (limited to 'target/linux/generic-2.6/patches-2.6.32')
-rw-r--r-- | target/linux/generic-2.6/patches-2.6.32/065-rootfs_split.patch | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.32/065-rootfs_split.patch b/target/linux/generic-2.6/patches-2.6.32/065-rootfs_split.patch index 307e5ee..22b3f5e 100644 --- a/target/linux/generic-2.6/patches-2.6.32/065-rootfs_split.patch +++ b/target/linux/generic-2.6/patches-2.6.32/065-rootfs_split.patch @@ -434,7 +434,7 @@ if (devt) { bdev = open_by_devnum(devt, FMODE_WRITE | FMODE_READ); } -@@ -263,17 +276,97 @@ static struct block2mtd_dev *add_device( +@@ -263,17 +276,98 @@ static struct block2mtd_dev *add_device( #endif if (IS_ERR(bdev)) { @@ -498,9 +498,10 @@ + bdev = open_by_devnum(devt, FMODE_WRITE | FMODE_READ); + if (!bdev || !bdev->bd_disk) + err = -EINVAL; -+ else { ++#ifndef CONFIG_MTD_BLOCK2MTD_MODULE ++ else + err = rescan_partitions(bdev->bd_disk, bdev); -+ } ++#endif + if (bdev) + close_bdev_exclusive(bdev, FMODE_READ|FMODE_WRITE); + @@ -535,7 +536,7 @@ if (!mtdname) mtdname = devname; -@@ -297,6 +390,7 @@ static struct block2mtd_dev *add_device( +@@ -297,6 +391,7 @@ static struct block2mtd_dev *add_device( dev->mtd.read = block2mtd_read; dev->mtd.priv = dev; dev->mtd.owner = THIS_MODULE; |