diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2008-11-05 10:47:35 +0000 |
---|---|---|
committer | Lars-Peter Clausen <lars@metafoo.de> | 2008-11-05 10:47:35 +0000 |
commit | 342901883cbd3c3cc838232dd3a8cd9e3fb11688 (patch) | |
tree | 072c4efe467b81660c11647269659b242328ada9 /target/linux/generic-2.6/patches-2.6.27 | |
parent | cc9c4dd24cc4fa1a516c55973cbbebfaab4c4e1b (diff) | |
download | master-187ad058-342901883cbd3c3cc838232dd3a8cd9e3fb11688.tar.gz master-187ad058-342901883cbd3c3cc838232dd3a8cd9e3fb11688.tar.bz2 master-187ad058-342901883cbd3c3cc838232dd3a8cd9e3fb11688.zip |
Fix broken patch to drivers/mtd/device/block2mtd.c
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13125 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic-2.6/patches-2.6.27')
-rw-r--r-- | target/linux/generic-2.6/patches-2.6.27/065-rootfs_split.patch | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.27/065-rootfs_split.patch b/target/linux/generic-2.6/patches-2.6.27/065-rootfs_split.patch index 41cca49cc3..aff95ccecc 100644 --- a/target/linux/generic-2.6/patches-2.6.27/065-rootfs_split.patch +++ b/target/linux/generic-2.6/patches-2.6.27/065-rootfs_split.patch @@ -387,19 +387,35 @@ return; } -@@ -231,31 +272,22 @@ static void block2mtd_free_device(struct - kfree(dev); +@@ -288,47 +288,17 @@ static void block2mtd_sync(struct mtd_info *mtd) } + +-static void block2mtd_free_device(struct block2mtd_dev *dev) +-{ +- if (!dev) +- return; +- +- kfree(dev->mtd.name); +- +- if (dev->blkdev) { +- invalidate_mapping_pages(dev->blkdev->bd_inode->i_mapping, +- 0, -1); +- close_bdev_excl(dev->blkdev); +- } +- +- kfree(dev); +-} +- - -/* FIXME: ensure that mtd->size % erase_size == 0 */ -static struct block2mtd_dev *add_device(char *devname, int erase_size, const char *mtdname) +static int _open_bdev(struct block2mtd_dev *dev) { struct block_device *bdev; - struct block2mtd_dev *dev; - struct mtd_partition *part; - char *name; +- struct block2mtd_dev *dev; +- struct mtd_partition *part; +- char *name; - if (!devname) - return NULL; @@ -422,7 +438,7 @@ if (devt) { bdev = open_by_devnum(devt, FMODE_WRITE | FMODE_READ); } -@@ -263,17 +295,96 @@ static struct block2mtd_dev *add_device( +@@ -263,17 +295,97 @@ static struct block2mtd_dev *add_device( #endif if (IS_ERR(bdev)) { @@ -504,6 +520,7 @@ +{ + struct block2mtd_dev *dev; + struct mtd_partition *part; ++ char *name; + + if (!devname) + return NULL; |