diff options
author | Michael Büsch <mb@bu3sch.de> | 2011-02-28 15:52:03 +0000 |
---|---|---|
committer | Michael Büsch <mb@bu3sch.de> | 2011-02-28 15:52:03 +0000 |
commit | 0ff0b6aa5ebb4d9811fc279571e53b893e78a30e (patch) | |
tree | 4af2bb3973dfd7b4e889db49c65149abda3a0a31 /target/linux | |
parent | 1147380771512da7e5b1c495117b2ecfcff53db6 (diff) | |
download | upstream-0ff0b6aa5ebb4d9811fc279571e53b893e78a30e.tar.gz upstream-0ff0b6aa5ebb4d9811fc279571e53b893e78a30e.tar.bz2 upstream-0ff0b6aa5ebb4d9811fc279571e53b893e78a30e.zip |
block2mtd: More 2.6.38 fixes
SVN-Revision: 25791
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/generic/patches-2.6.38/067-block2mtd_2.6.38_fix.patch | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/target/linux/generic/patches-2.6.38/067-block2mtd_2.6.38_fix.patch b/target/linux/generic/patches-2.6.38/067-block2mtd_2.6.38_fix.patch index 74e0a2f3e5..22b845f777 100644 --- a/target/linux/generic/patches-2.6.38/067-block2mtd_2.6.38_fix.patch +++ b/target/linux/generic/patches-2.6.38/067-block2mtd_2.6.38_fix.patch @@ -1,6 +1,23 @@ ---- a/drivers/mtd/devices/block2mtd.c -+++ b/drivers/mtd/devices/block2mtd.c -@@ -330,7 +330,7 @@ static int block2mtd_refresh(struct mtd_ +Index: linux-2.6.38-rc6/drivers/mtd/devices/block2mtd.c +=================================================================== +--- linux-2.6.38-rc6.orig/drivers/mtd/devices/block2mtd.c 2011-02-28 16:41:59.839603348 +0100 ++++ linux-2.6.38-rc6/drivers/mtd/devices/block2mtd.c 2011-02-28 16:47:59.637698484 +0100 +@@ -264,12 +264,13 @@ static int _open_bdev(struct block2mtd_d + bdev = blkdev_get_by_path(dev->devname, mode, dev); + #ifndef MODULE + if (IS_ERR(bdev)) { ++ dev_t devt; + + /* We might not have rootfs mounted at this point. Try + to resolve the device name by other means. */ + + wait_for_device_probe(); +- dev_t devt = name_to_dev_t(dev->devname); ++ devt = name_to_dev_t(dev->devname); + if (devt) + bdev = blkdev_get_by_dev(devt, mode, dev); + } +@@ -330,7 +331,7 @@ static int block2mtd_refresh(struct mtd_ _close_bdev(dev); /* open the whole disk, issue a partition rescan, then */ @@ -9,3 +26,12 @@ if (!bdev || !bdev->bd_disk) err = -EINVAL; #ifndef CONFIG_MTD_BLOCK2MTD_MODULE +@@ -395,7 +396,7 @@ static struct block2mtd_dev *add_device( + dev->mtd.refresh_device = block2mtd_refresh; + + part = kzalloc(sizeof(struct mtd_partition), GFP_KERNEL); +- part->name = dev->mtd.name; ++ part->name = name; + part->offset = 0; + part->size = dev->mtd.size; + if (add_mtd_partitions(&dev->mtd, part, 1)) { |