X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/8b102012a035b522000ce7e76e12f9285630e3ff..340372534c675c7f78be83cfc0a690fb0ddcad92:/target/linux/generic/patches-2.6.39/400-rootfs_split.patch diff --git a/target/linux/generic/patches-2.6.39/400-rootfs_split.patch b/target/linux/generic/patches-2.6.39/400-rootfs_split.patch index b41c740cc..226118986 100644 --- a/target/linux/generic/patches-2.6.39/400-rootfs_split.patch +++ b/target/linux/generic/patches-2.6.39/400-rootfs_split.patch @@ -193,7 +193,7 @@ /* * This function, given a master MTD object and a partition table, creates * and registers slave MTD objects which are bound to the master according to -@@ -652,6 +801,9 @@ int add_mtd_partitions(struct mtd_info * +@@ -652,6 +803,9 @@ int add_mtd_partitions(struct mtd_info * struct mtd_part *slave; uint64_t cur_offset = 0; int i; @@ -203,7 +203,7 @@ printk(KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nbparts, master->name); -@@ -666,6 +818,21 @@ int add_mtd_partitions(struct mtd_info * +@@ -666,6 +820,21 @@ int add_mtd_partitions(struct mtd_info * add_mtd_device(&slave->mtd); @@ -225,7 +225,7 @@ cur_offset = slave->offset + slave->mtd.size; } -@@ -673,6 +840,32 @@ int add_mtd_partitions(struct mtd_info * +@@ -673,6 +842,32 @@ int add_mtd_partitions(struct mtd_info * } EXPORT_SYMBOL(add_mtd_partitions); @@ -260,10 +260,10 @@ --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c -@@ -841,6 +841,13 @@ static int mtd_ioctl(struct file *file, - file->f_pos = 0; +@@ -956,6 +956,13 @@ static int mtd_ioctl(struct file *file, break; } + #endif +#ifdef CONFIG_MTD_PARTITIONS + case MTDREFRESH: + { @@ -272,8 +272,8 @@ + } +#endif - case OTPGETREGIONCOUNT: - case OTPGETREGIONINFO: + default: + ret = -ENOTTY; --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -125,6 +125,7 @@ struct nand_ecclayout { @@ -325,7 +325,7 @@ #define MEMWRITEOOB64 _IOWR('M', 21, struct mtd_oob_buf64) #define MEMREADOOB64 _IOWR('M', 22, struct mtd_oob_buf64) #define MEMISLOCKED _IOR('M', 23, struct erase_info_user) -+#define MTDREFRESH _IO('M', 23) ++#define MTDREFRESH _IO('M', 50) /* * Obsolete legacy interface. Keep it in order not to break userspace