/*
* 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;
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);
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);
--- 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:
+ {
+ }
+#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 {
#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