summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-02-18 21:34:49 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-02-18 21:34:49 +0000
commitdcedf23ed4c13210b9d175cb25f6f721df72b29e (patch)
treefc7109ab281824283400d0f3c13f17e0d766c893 /target
parentc59c6f6f00ac21c6bca37bc806e61bed5956245b (diff)
fix a compile error in block2mtd when compiled as module
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19709 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic-2.6/patches-2.6.30/065-rootfs_split.patch9
-rw-r--r--target/linux/generic-2.6/patches-2.6.31/065-rootfs_split.patch9
-rw-r--r--target/linux/generic-2.6/patches-2.6.32/065-rootfs_split.patch9
3 files changed, 15 insertions, 12 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.30/065-rootfs_split.patch b/target/linux/generic-2.6/patches-2.6.30/065-rootfs_split.patch
index 824e3df10..34c1f5add 100644
--- a/target/linux/generic-2.6/patches-2.6.30/065-rootfs_split.patch
+++ b/target/linux/generic-2.6/patches-2.6.30/065-rootfs_split.patch
@@ -441,7 +441,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)) {
@@ -505,9 +505,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);
+
@@ -542,7 +543,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;
diff --git a/target/linux/generic-2.6/patches-2.6.31/065-rootfs_split.patch b/target/linux/generic-2.6/patches-2.6.31/065-rootfs_split.patch
index 50ca25ce6..7956baf9b 100644
--- a/target/linux/generic-2.6/patches-2.6.31/065-rootfs_split.patch
+++ b/target/linux/generic-2.6/patches-2.6.31/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;
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 307e5ee34..22b3f5e90 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;