Changeset 25791


Ignore:
Timestamp:
2011-02-28T16:52:03+01:00 (7 years ago)
Author:
mb
Message:

block2mtd: More 2.6.38 fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic/patches-2.6.38/067-block2mtd_2.6.38_fix.patch

    r25704 r25791  
    1 --- a/drivers/mtd/devices/block2mtd.c 
    2 +++ b/drivers/mtd/devices/block2mtd.c 
    3 @@ -330,7 +330,7 @@ static int block2mtd_refresh(struct mtd_ 
     1Index: linux-2.6.38-rc6/drivers/mtd/devices/block2mtd.c 
     2=================================================================== 
     3--- linux-2.6.38-rc6.orig/drivers/mtd/devices/block2mtd.c       2011-02-28 16:41:59.839603348 +0100 
     4+++ linux-2.6.38-rc6/drivers/mtd/devices/block2mtd.c    2011-02-28 16:47:59.637698484 +0100 
     5@@ -264,12 +264,13 @@ static int _open_bdev(struct block2mtd_d 
     6        bdev = blkdev_get_by_path(dev->devname, mode, dev); 
     7 #ifndef MODULE 
     8        if (IS_ERR(bdev)) { 
     9+               dev_t devt; 
     10  
     11                /* We might not have rootfs mounted at this point. Try 
     12                   to resolve the device name by other means. */ 
     13  
     14                wait_for_device_probe(); 
     15-               dev_t devt = name_to_dev_t(dev->devname); 
     16+               devt = name_to_dev_t(dev->devname); 
     17                if (devt) 
     18                        bdev = blkdev_get_by_dev(devt, mode, dev); 
     19        } 
     20@@ -330,7 +331,7 @@ static int block2mtd_refresh(struct mtd_ 
    421        _close_bdev(dev); 
    522  
     
    1027                err = -EINVAL; 
    1128 #ifndef CONFIG_MTD_BLOCK2MTD_MODULE 
     29@@ -395,7 +396,7 @@ static struct block2mtd_dev *add_device( 
     30        dev->mtd.refresh_device = block2mtd_refresh; 
     31  
     32        part = kzalloc(sizeof(struct mtd_partition), GFP_KERNEL); 
     33-       part->name = dev->mtd.name; 
     34+       part->name = name; 
     35        part->offset = 0; 
     36        part->size = dev->mtd.size; 
     37        if (add_mtd_partitions(&dev->mtd, part, 1)) { 
Note: See TracChangeset for help on using the changeset viewer.