aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-4.9/404-mtd-add-more-helper-functions.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2017-06-23 10:27:20 +0200
committerRafał Miłecki <rafal@milecki.pl>2017-06-23 11:40:05 +0200
commit8c1e760ab60994de26d2a2c85f91e86192999dfb (patch)
tree741281d011dac79b540cc69ed4cd39f6a426ecb8 /target/linux/generic/patches-4.9/404-mtd-add-more-helper-functions.patch
parent4052443a235433fb97af9711bf6429cd05820ba9 (diff)
downloadupstream-8c1e760ab60994de26d2a2c85f91e86192999dfb.tar.gz
upstream-8c1e760ab60994de26d2a2c85f91e86192999dfb.tar.bz2
upstream-8c1e760ab60994de26d2a2c85f91e86192999dfb.zip
kernel: backport upstream mtdpart.c cleanups
Except for renames and line changes the only conflict was in allocate_partition in handling MTD_WRITEABLE. Hopefully it was handled correctly. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/patches-4.9/404-mtd-add-more-helper-functions.patch')
-rw-r--r--target/linux/generic/patches-4.9/404-mtd-add-more-helper-functions.patch10
1 files changed, 5 insertions, 5 deletions
diff --git a/target/linux/generic/patches-4.9/404-mtd-add-more-helper-functions.patch b/target/linux/generic/patches-4.9/404-mtd-add-more-helper-functions.patch
index 6ecd6a1a34..319a22a450 100644
--- a/target/linux/generic/patches-4.9/404-mtd-add-more-helper-functions.patch
+++ b/target/linux/generic/patches-4.9/404-mtd-add-more-helper-functions.patch
@@ -1,6 +1,6 @@
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
-@@ -717,6 +717,17 @@ run_parsers_by_type(struct mtd_part *sla
+@@ -753,6 +753,17 @@ run_parsers_by_type(struct mtd_part *sla
return nr_parts;
}
@@ -18,7 +18,7 @@
#ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
#define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME
#else
-@@ -1055,6 +1066,24 @@ int mtd_is_partition(const struct mtd_in
+@@ -1106,6 +1117,24 @@ int mtd_is_partition(const struct mtd_in
}
EXPORT_SYMBOL_GPL(mtd_is_partition);
@@ -27,7 +27,7 @@
+ if (!mtd_is_partition(mtd))
+ return (struct mtd_info *)mtd;
+
-+ return mtd_to_part(mtd)->master;
++ return mtd_to_part(mtd)->parent;
+}
+EXPORT_SYMBOL_GPL(mtdpart_get_master);
+
@@ -45,7 +45,7 @@
{
--- a/include/linux/mtd/partitions.h
+++ b/include/linux/mtd/partitions.h
-@@ -106,6 +106,8 @@ int mtd_is_partition(const struct mtd_in
+@@ -107,6 +107,8 @@ int mtd_is_partition(const struct mtd_in
int mtd_add_partition(struct mtd_info *master, const char *name,
long long offset, long long length);
int mtd_del_partition(struct mtd_info *master, int partno);
@@ -56,7 +56,7 @@
const char *name, int offset, int size);
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
-@@ -472,6 +472,24 @@ static inline uint32_t mtd_mod_by_eb(uin
+@@ -485,6 +485,24 @@ static inline uint32_t mtd_mod_by_eb(uin
return do_div(sz, mtd->erasesize);
}