mirror of https://github.com/hak5/openwrt.git
adm5120: make patches apply again
Fix patches not applying anymore since r46654. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 46714lede-17.01
parent
2d379e796f
commit
548630d74e
|
@ -1,9 +1,9 @@
|
||||||
--- a/drivers/mtd/mtdpart.c
|
--- a/drivers/mtd/mtdpart.c
|
||||||
+++ b/drivers/mtd/mtdpart.c
|
+++ b/drivers/mtd/mtdpart.c
|
||||||
@@ -29,11 +29,9 @@
|
@@ -30,11 +30,9 @@
|
||||||
#include <linux/kmod.h>
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
#include <linux/of.h>
|
||||||
-#include <linux/magic.h>
|
-#include <linux/magic.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#define MTD_ERASE_PARTIAL 0x8000 /* partition only covers parts of an erase block */
|
#define MTD_ERASE_PARTIAL 0x8000 /* partition only covers parts of an erase block */
|
||||||
|
|
||||||
@@ -49,14 +47,13 @@ struct mtd_part {
|
@@ -50,14 +48,13 @@ struct mtd_part {
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
/*
|
/*
|
||||||
* MTD methods which simply translate the effective address and pass through
|
* MTD methods which simply translate the effective address and pass through
|
||||||
* to the _real_ device.
|
* to the _real_ device.
|
||||||
@@ -520,12 +517,14 @@ static struct mtd_part *allocate_partiti
|
@@ -521,12 +518,14 @@ static struct mtd_part *allocate_partiti
|
||||||
if (slave->offset == MTDPART_OFS_APPEND)
|
if (slave->offset == MTDPART_OFS_APPEND)
|
||||||
slave->offset = cur_offset;
|
slave->offset = cur_offset;
|
||||||
if (slave->offset == MTDPART_OFS_NXTBLK) {
|
if (slave->offset == MTDPART_OFS_NXTBLK) {
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
}
|
}
|
||||||
if (slave->offset == MTDPART_OFS_RETAIN) {
|
if (slave->offset == MTDPART_OFS_RETAIN) {
|
||||||
slave->offset = cur_offset;
|
slave->offset = cur_offset;
|
||||||
@@ -626,10 +625,8 @@ out_register:
|
@@ -627,10 +626,8 @@ out_register:
|
||||||
return slave;
|
return slave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
{
|
{
|
||||||
struct mtd_partition part;
|
struct mtd_partition part;
|
||||||
struct mtd_part *p, *new;
|
struct mtd_part *p, *new;
|
||||||
@@ -661,24 +658,21 @@ __mtd_add_partition(struct mtd_info *mas
|
@@ -662,24 +659,21 @@ __mtd_add_partition(struct mtd_info *mas
|
||||||
end = offset + length;
|
end = offset + length;
|
||||||
|
|
||||||
mutex_lock(&mtd_partitions_mutex);
|
mutex_lock(&mtd_partitions_mutex);
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
err_inv:
|
err_inv:
|
||||||
@@ -688,12 +682,6 @@ err_inv:
|
@@ -689,12 +683,6 @@ err_inv:
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mtd_add_partition);
|
EXPORT_SYMBOL_GPL(mtd_add_partition);
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
int mtd_del_partition(struct mtd_info *master, int partno)
|
int mtd_del_partition(struct mtd_info *master, int partno)
|
||||||
{
|
{
|
||||||
struct mtd_part *slave, *next;
|
struct mtd_part *slave, *next;
|
||||||
@@ -717,166 +705,6 @@ int mtd_del_partition(struct mtd_info *m
|
@@ -718,166 +706,6 @@ int mtd_del_partition(struct mtd_info *m
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mtd_del_partition);
|
EXPORT_SYMBOL_GPL(mtd_del_partition);
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@
|
||||||
/*
|
/*
|
||||||
* This function, given a master MTD object and a partition table, creates
|
* 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
|
* and registers slave MTD objects which are bound to the master according to
|
||||||
@@ -906,7 +734,6 @@ int add_mtd_partitions(struct mtd_info *
|
@@ -907,7 +735,6 @@ int add_mtd_partitions(struct mtd_info *
|
||||||
mutex_unlock(&mtd_partitions_mutex);
|
mutex_unlock(&mtd_partitions_mutex);
|
||||||
|
|
||||||
add_mtd_device(&slave->mtd);
|
add_mtd_device(&slave->mtd);
|
||||||
|
@ -282,7 +282,7 @@
|
||||||
|
|
||||||
cur_offset = slave->offset + slave->mtd.size;
|
cur_offset = slave->offset + slave->mtd.size;
|
||||||
}
|
}
|
||||||
@@ -936,30 +763,6 @@ static struct mtd_part_parser *get_parti
|
@@ -937,30 +764,6 @@ static struct mtd_part_parser *get_parti
|
||||||
|
|
||||||
#define put_partition_parser(p) do { module_put((p)->owner); } while (0)
|
#define put_partition_parser(p) do { module_put((p)->owner); } while (0)
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@
|
||||||
void register_mtd_parser(struct mtd_part_parser *p)
|
void register_mtd_parser(struct mtd_part_parser *p)
|
||||||
{
|
{
|
||||||
spin_lock(&part_parser_lock);
|
spin_lock(&part_parser_lock);
|
||||||
@@ -1033,38 +836,6 @@ int parse_mtd_partitions(struct mtd_info
|
@@ -1076,38 +879,6 @@ int parse_mtd_partitions(struct mtd_info
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,16 +17,16 @@
|
||||||
---help---
|
---help---
|
||||||
--- a/drivers/mtd/mtdpart.c
|
--- a/drivers/mtd/mtdpart.c
|
||||||
+++ b/drivers/mtd/mtdpart.c
|
+++ b/drivers/mtd/mtdpart.c
|
||||||
@@ -29,6 +29,8 @@
|
@@ -30,6 +30,8 @@
|
||||||
#include <linux/kmod.h>
|
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
|
#include <linux/of.h>
|
||||||
+#include <linux/root_dev.h>
|
+#include <linux/root_dev.h>
|
||||||
+#include <linux/magic.h>
|
+#include <linux/magic.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
|
|
||||||
#include "mtdcore.h"
|
#include "mtdcore.h"
|
||||||
@@ -52,7 +54,7 @@ struct mtd_part {
|
@@ -53,7 +55,7 @@ struct mtd_part {
|
||||||
* the pointer to that structure with this macro.
|
* the pointer to that structure with this macro.
|
||||||
*/
|
*/
|
||||||
#define PART(x) ((struct mtd_part *)(x))
|
#define PART(x) ((struct mtd_part *)(x))
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MTD methods which simply translate the effective address and pass through
|
* MTD methods which simply translate the effective address and pass through
|
||||||
@@ -705,6 +707,144 @@ int mtd_del_partition(struct mtd_info *m
|
@@ -706,6 +708,144 @@ int mtd_del_partition(struct mtd_info *m
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mtd_del_partition);
|
EXPORT_SYMBOL_GPL(mtd_del_partition);
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@
|
||||||
/*
|
/*
|
||||||
* This function, given a master MTD object and a partition table, creates
|
* 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
|
* and registers slave MTD objects which are bound to the master according to
|
||||||
@@ -721,6 +861,9 @@ int add_mtd_partitions(struct mtd_info *
|
@@ -722,6 +862,9 @@ int add_mtd_partitions(struct mtd_info *
|
||||||
struct mtd_part *slave;
|
struct mtd_part *slave;
|
||||||
uint64_t cur_offset = 0;
|
uint64_t cur_offset = 0;
|
||||||
int i;
|
int i;
|
||||||
|
@ -190,7 +190,7 @@
|
||||||
|
|
||||||
printk(KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nbparts, master->name);
|
printk(KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nbparts, master->name);
|
||||||
|
|
||||||
@@ -735,12 +878,53 @@ int add_mtd_partitions(struct mtd_info *
|
@@ -736,12 +879,53 @@ int add_mtd_partitions(struct mtd_info *
|
||||||
|
|
||||||
add_mtd_device(&slave->mtd);
|
add_mtd_device(&slave->mtd);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue