diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-01-22 18:36:49 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-01-22 18:36:49 +0000 |
commit | 9be1b9164404c6e048619a1749b14413749ddca1 (patch) | |
tree | e0974ad4f809d638b6293eb8937ff32c95a9a826 /target/linux/generic/files/drivers | |
parent | 809fe38e4166834dcccf48519863b05cb2930bbc (diff) | |
download | mtk-20170518-9be1b9164404c6e048619a1749b14413749ddca1.zip mtk-20170518-9be1b9164404c6e048619a1749b14413749ddca1.tar.gz mtk-20170518-9be1b9164404c6e048619a1749b14413749ddca1.tar.bz2 |
generic: allow to build myloader mtd parser for 3.2+
SVN-Revision: 29858
Diffstat (limited to 'target/linux/generic/files/drivers')
-rw-r--r-- | target/linux/generic/files/drivers/mtd/myloader.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/target/linux/generic/files/drivers/mtd/myloader.c b/target/linux/generic/files/drivers/mtd/myloader.c index 51c0374..a13752d 100644 --- a/target/linux/generic/files/drivers/mtd/myloader.c +++ b/target/linux/generic/files/drivers/mtd/myloader.c @@ -14,6 +14,8 @@ */ #include <linux/kernel.h> +#include <linux/module.h> +#include <linux/version.h> #include <linux/slab.h> #include <linux/init.h> #include <linux/vmalloc.h> @@ -30,9 +32,15 @@ struct part_data { char names[MYLO_MAX_PARTITIONS][PART_NAME_LEN]; }; -int myloader_parse_partitions(struct mtd_info *master, - struct mtd_partition **pparts, - unsigned long origin) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) +static int myloader_parse_partitions(struct mtd_info *master, + struct mtd_partition **pparts, + struct mtd_part_parser_data *data) +#else +static int myloader_parse_partitions(struct mtd_info *master, + struct mtd_partition **pparts, + unsigned long origin) +#endif { struct part_data *buf; struct mylo_partition_table *tab; |