aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-01-22 18:36:49 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-01-22 18:36:49 +0000
commit16b4bf4bc9425cb2a83f4181b2df5ad78de95839 (patch)
tree0ea8b4c796b4eef8dfb0409a17d61eb6ad55911c /target/linux
parentf5db29305f312f667cdb796e07c333dcf69c20c1 (diff)
downloadupstream-16b4bf4bc9425cb2a83f4181b2df5ad78de95839.tar.gz
upstream-16b4bf4bc9425cb2a83f4181b2df5ad78de95839.tar.bz2
upstream-16b4bf4bc9425cb2a83f4181b2df5ad78de95839.zip
generic: allow to build myloader mtd parser for 3.2+
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29858 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic/files/drivers/mtd/myloader.c14
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 51c037459f..a13752dd98 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;