aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-02-01 08:06:10 +0100
committerFelix Fietkau <nbd@nbd.name>2017-02-03 12:35:44 +0100
commit402193baa155255f08944a579f1f17e016d6cac2 (patch)
treeef7d78b5a07148968bc109076543f4a7cfcf7723
parenteccb2e5e59f01dcd5a70c390e934f11b62e7dce8 (diff)
downloadupstream-402193baa155255f08944a579f1f17e016d6cac2.tar.gz
upstream-402193baa155255f08944a579f1f17e016d6cac2.tar.bz2
upstream-402193baa155255f08944a579f1f17e016d6cac2.zip
kernel: update mtdsplit for linux 4.9
add backport patches for older kernels Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_brnimage.c2
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c2
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c3
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_lzma.c2
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c2
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c2
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c4
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_trx.c2
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c8
-rw-r--r--target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c4
-rw-r--r--target/linux/generic/patches-3.18/001-mtdsplit_backport.patch142
-rw-r--r--target/linux/generic/patches-4.4/001-mtdsplit_backport.patch142
12 files changed, 300 insertions, 15 deletions
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_brnimage.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_brnimage.c
index 1f4325ac9a..3f2d79601a 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_brnimage.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_brnimage.c
@@ -27,7 +27,7 @@
#define BRNIMAGE_MAX_OVERHEAD (BRNIMAGE_ALIGN_BYTES + BRNIMAGE_FOOTER_SIZE)
static int mtdsplit_parse_brnimage(struct mtd_info *master,
- struct mtd_partition **pparts,
+ const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{
struct mtd_partition *parts;
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c
index 3edc104f4e..746944ee2e 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_eva.c
@@ -29,7 +29,7 @@ struct eva_image_header {
};
static int mtdsplit_parse_eva(struct mtd_info *master,
- struct mtd_partition **pparts,
+ const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{
struct mtd_partition *parts;
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c
index 57954061cd..f356adcd4e 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c
@@ -45,7 +45,8 @@ struct fdt_header {
};
static int
-mtdsplit_fit_parse(struct mtd_info *mtd, struct mtd_partition **pparts,
+mtdsplit_fit_parse(struct mtd_info *mtd,
+ const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{
struct fdt_header hdr;
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_lzma.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_lzma.c
index f3d8c040c2..b7f044a6dc 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_lzma.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_lzma.c
@@ -28,7 +28,7 @@ struct lzma_header {
};
static int mtdsplit_parse_lzma(struct mtd_info *master,
- struct mtd_partition **pparts,
+ const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{
struct lzma_header hdr;
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c
index 9fe1311018..f8556e05a4 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_seama.c
@@ -30,7 +30,7 @@ struct seama_header {
};
static int mtdsplit_parse_seama(struct mtd_info *master,
- struct mtd_partition **pparts,
+ const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{
struct seama_header hdr;
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c
index 43b44d5642..79e1f73bca 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_squashfs.c
@@ -23,7 +23,7 @@
static int
mtdsplit_parse_squashfs(struct mtd_info *master,
- struct mtd_partition **pparts,
+ const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{
struct mtd_partition *part;
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c
index d0cb381363..3a50250715 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_tplink.c
@@ -83,8 +83,8 @@ struct tplink_fw_header {
};
static int mtdsplit_parse_tplink(struct mtd_info *master,
- struct mtd_partition **pparts,
- struct mtd_part_parser_data *data)
+ const struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
{
struct tplink_fw_header hdr;
size_t hdr_len, retlen, kernel_size;
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_trx.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_trx.c
index 29f47b283e..53aebc5987 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_trx.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_trx.c
@@ -56,7 +56,7 @@ read_trx_header(struct mtd_info *mtd, size_t offset,
static int
mtdsplit_parse_trx(struct mtd_info *master,
- struct mtd_partition **pparts,
+ const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{
struct mtd_partition *parts;
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
index 41a1b3746d..ee65144fea 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
@@ -81,7 +81,7 @@ read_uimage_header(struct mtd_info *mtd, size_t offset, u_char *buf,
* of a valid uImage header if found
*/
static int __mtdsplit_parse_uimage(struct mtd_info *master,
- struct mtd_partition **pparts,
+ const struct mtd_partition **pparts,
struct mtd_part_parser_data *data,
ssize_t (*find_header)(u_char *buf, size_t len))
{
@@ -232,7 +232,7 @@ static ssize_t uimage_verify_default(u_char *buf, size_t len)
static int
mtdsplit_uimage_parse_generic(struct mtd_info *master,
- struct mtd_partition **pparts,
+ const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{
return __mtdsplit_parse_uimage(master, pparts, data,
@@ -289,7 +289,7 @@ static ssize_t uimage_verify_wndr3700(u_char *buf, size_t len)
static int
mtdsplit_uimage_parse_netgear(struct mtd_info *master,
- struct mtd_partition **pparts,
+ const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{
return __mtdsplit_parse_uimage(master, pparts, data,
@@ -331,7 +331,7 @@ static ssize_t uimage_find_edimax(u_char *buf, size_t len)
static int
mtdsplit_uimage_parse_edimax(struct mtd_info *master,
- struct mtd_partition **pparts,
+ const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
{
return __mtdsplit_parse_uimage(master, pparts, data,
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c
index c1fbccbd25..c0e897777d 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_wrgg.c
@@ -40,8 +40,8 @@ struct wrgg03_header {
static int mtdsplit_parse_wrgg(struct mtd_info *master,
- struct mtd_partition **pparts,
- struct mtd_part_parser_data *data)
+ const struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
{
struct wrgg03_header hdr;
size_t hdr_len, retlen, kernel_ent_size;
diff --git a/target/linux/generic/patches-3.18/001-mtdsplit_backport.patch b/target/linux/generic/patches-3.18/001-mtdsplit_backport.patch
new file mode 100644
index 0000000000..97cd62d75c
--- /dev/null
+++ b/target/linux/generic/patches-3.18/001-mtdsplit_backport.patch
@@ -0,0 +1,142 @@
+--- a/drivers/mtd/mtdsplit/mtdsplit_brnimage.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_brnimage.c
+@@ -27,7 +27,7 @@
+ #define BRNIMAGE_MAX_OVERHEAD (BRNIMAGE_ALIGN_BYTES + BRNIMAGE_FOOTER_SIZE)
+
+ static int mtdsplit_parse_brnimage(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ struct mtd_partition *parts;
+--- a/drivers/mtd/mtdsplit/mtdsplit_eva.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_eva.c
+@@ -29,7 +29,7 @@ struct eva_image_header {
+ };
+
+ static int mtdsplit_parse_eva(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ struct mtd_partition *parts;
+--- a/drivers/mtd/mtdsplit/mtdsplit_fit.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_fit.c
+@@ -45,8 +45,7 @@ struct fdt_header {
+ };
+
+ static int
+-mtdsplit_fit_parse(struct mtd_info *mtd,
+- const struct mtd_partition **pparts,
++mtdsplit_fit_parse(struct mtd_info *mtd, struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ struct fdt_header hdr;
+--- a/drivers/mtd/mtdsplit/mtdsplit_lzma.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_lzma.c
+@@ -28,7 +28,7 @@ struct lzma_header {
+ };
+
+ static int mtdsplit_parse_lzma(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ struct lzma_header hdr;
+--- a/drivers/mtd/mtdsplit/mtdsplit_seama.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_seama.c
+@@ -30,7 +30,7 @@ struct seama_header {
+ };
+
+ static int mtdsplit_parse_seama(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ struct seama_header hdr;
+--- a/drivers/mtd/mtdsplit/mtdsplit_squashfs.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_squashfs.c
+@@ -23,7 +23,7 @@
+
+ static int
+ mtdsplit_parse_squashfs(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ struct mtd_partition *part;
+--- a/drivers/mtd/mtdsplit/mtdsplit_tplink.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_tplink.c
+@@ -83,8 +83,8 @@ struct tplink_fw_header {
+ };
+
+ static int mtdsplit_parse_tplink(struct mtd_info *master,
+- const struct mtd_partition **pparts,
+- struct mtd_part_parser_data *data)
++ struct mtd_partition **pparts,
++ struct mtd_part_parser_data *data)
+ {
+ struct tplink_fw_header hdr;
+ size_t hdr_len, retlen, kernel_size;
+--- a/drivers/mtd/mtdsplit/mtdsplit_trx.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_trx.c
+@@ -56,7 +56,7 @@ read_trx_header(struct mtd_info *mtd, si
+
+ static int
+ mtdsplit_parse_trx(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ struct mtd_partition *parts;
+--- a/drivers/mtd/mtdsplit/mtdsplit_uimage.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_uimage.c
+@@ -81,7 +81,7 @@ read_uimage_header(struct mtd_info *mtd,
+ * of a valid uImage header if found
+ */
+ static int __mtdsplit_parse_uimage(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data,
+ ssize_t (*find_header)(u_char *buf, size_t len))
+ {
+@@ -232,7 +232,7 @@ static ssize_t uimage_verify_default(u_c
+
+ static int
+ mtdsplit_uimage_parse_generic(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ return __mtdsplit_parse_uimage(master, pparts, data,
+@@ -289,7 +289,7 @@ static ssize_t uimage_verify_wndr3700(u_
+
+ static int
+ mtdsplit_uimage_parse_netgear(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ return __mtdsplit_parse_uimage(master, pparts, data,
+@@ -331,7 +331,7 @@ static ssize_t uimage_find_edimax(u_char
+
+ static int
+ mtdsplit_uimage_parse_edimax(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ return __mtdsplit_parse_uimage(master, pparts, data,
+--- a/drivers/mtd/mtdsplit/mtdsplit_wrgg.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_wrgg.c
+@@ -40,8 +40,8 @@ struct wrgg03_header {
+
+
+ static int mtdsplit_parse_wrgg(struct mtd_info *master,
+- const struct mtd_partition **pparts,
+- struct mtd_part_parser_data *data)
++ struct mtd_partition **pparts,
++ struct mtd_part_parser_data *data)
+ {
+ struct wrgg03_header hdr;
+ size_t hdr_len, retlen, kernel_ent_size;
diff --git a/target/linux/generic/patches-4.4/001-mtdsplit_backport.patch b/target/linux/generic/patches-4.4/001-mtdsplit_backport.patch
new file mode 100644
index 0000000000..97cd62d75c
--- /dev/null
+++ b/target/linux/generic/patches-4.4/001-mtdsplit_backport.patch
@@ -0,0 +1,142 @@
+--- a/drivers/mtd/mtdsplit/mtdsplit_brnimage.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_brnimage.c
+@@ -27,7 +27,7 @@
+ #define BRNIMAGE_MAX_OVERHEAD (BRNIMAGE_ALIGN_BYTES + BRNIMAGE_FOOTER_SIZE)
+
+ static int mtdsplit_parse_brnimage(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ struct mtd_partition *parts;
+--- a/drivers/mtd/mtdsplit/mtdsplit_eva.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_eva.c
+@@ -29,7 +29,7 @@ struct eva_image_header {
+ };
+
+ static int mtdsplit_parse_eva(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ struct mtd_partition *parts;
+--- a/drivers/mtd/mtdsplit/mtdsplit_fit.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_fit.c
+@@ -45,8 +45,7 @@ struct fdt_header {
+ };
+
+ static int
+-mtdsplit_fit_parse(struct mtd_info *mtd,
+- const struct mtd_partition **pparts,
++mtdsplit_fit_parse(struct mtd_info *mtd, struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ struct fdt_header hdr;
+--- a/drivers/mtd/mtdsplit/mtdsplit_lzma.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_lzma.c
+@@ -28,7 +28,7 @@ struct lzma_header {
+ };
+
+ static int mtdsplit_parse_lzma(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ struct lzma_header hdr;
+--- a/drivers/mtd/mtdsplit/mtdsplit_seama.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_seama.c
+@@ -30,7 +30,7 @@ struct seama_header {
+ };
+
+ static int mtdsplit_parse_seama(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ struct seama_header hdr;
+--- a/drivers/mtd/mtdsplit/mtdsplit_squashfs.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_squashfs.c
+@@ -23,7 +23,7 @@
+
+ static int
+ mtdsplit_parse_squashfs(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ struct mtd_partition *part;
+--- a/drivers/mtd/mtdsplit/mtdsplit_tplink.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_tplink.c
+@@ -83,8 +83,8 @@ struct tplink_fw_header {
+ };
+
+ static int mtdsplit_parse_tplink(struct mtd_info *master,
+- const struct mtd_partition **pparts,
+- struct mtd_part_parser_data *data)
++ struct mtd_partition **pparts,
++ struct mtd_part_parser_data *data)
+ {
+ struct tplink_fw_header hdr;
+ size_t hdr_len, retlen, kernel_size;
+--- a/drivers/mtd/mtdsplit/mtdsplit_trx.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_trx.c
+@@ -56,7 +56,7 @@ read_trx_header(struct mtd_info *mtd, si
+
+ static int
+ mtdsplit_parse_trx(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ struct mtd_partition *parts;
+--- a/drivers/mtd/mtdsplit/mtdsplit_uimage.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_uimage.c
+@@ -81,7 +81,7 @@ read_uimage_header(struct mtd_info *mtd,
+ * of a valid uImage header if found
+ */
+ static int __mtdsplit_parse_uimage(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data,
+ ssize_t (*find_header)(u_char *buf, size_t len))
+ {
+@@ -232,7 +232,7 @@ static ssize_t uimage_verify_default(u_c
+
+ static int
+ mtdsplit_uimage_parse_generic(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ return __mtdsplit_parse_uimage(master, pparts, data,
+@@ -289,7 +289,7 @@ static ssize_t uimage_verify_wndr3700(u_
+
+ static int
+ mtdsplit_uimage_parse_netgear(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ return __mtdsplit_parse_uimage(master, pparts, data,
+@@ -331,7 +331,7 @@ static ssize_t uimage_find_edimax(u_char
+
+ static int
+ mtdsplit_uimage_parse_edimax(struct mtd_info *master,
+- const struct mtd_partition **pparts,
++ struct mtd_partition **pparts,
+ struct mtd_part_parser_data *data)
+ {
+ return __mtdsplit_parse_uimage(master, pparts, data,
+--- a/drivers/mtd/mtdsplit/mtdsplit_wrgg.c
++++ b/drivers/mtd/mtdsplit/mtdsplit_wrgg.c
+@@ -40,8 +40,8 @@ struct wrgg03_header {
+
+
+ static int mtdsplit_parse_wrgg(struct mtd_info *master,
+- const struct mtd_partition **pparts,
+- struct mtd_part_parser_data *data)
++ struct mtd_partition **pparts,
++ struct mtd_part_parser_data *data)
+ {
+ struct wrgg03_header hdr;
+ size_t hdr_len, retlen, kernel_ent_size;