OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 9... Line 9...
9 include/linux/mtd/partitions.h | 2 ++ 9 include/linux/mtd/partitions.h | 2 ++
10 3 files changed, 49 insertions(+) 10 3 files changed, 49 insertions(+)
Line 11... Line 11...
11   11  
12 --- a/drivers/mtd/mtdpart.c 12 --- a/drivers/mtd/mtdpart.c
-   13 +++ b/drivers/mtd/mtdpart.c
-   14 @@ -763,6 +763,17 @@ run_parsers_by_type(struct mtd_part *sla
-   15 return nr_parts;
-   16 }
-   17
-   18 +static inline unsigned long
-   19 +mtd_pad_erasesize(struct mtd_info *mtd, int offset, int len)
-   20 +{
-   21 + unsigned long mask = mtd->erasesize - 1;
-   22 +
-   23 + len += offset & mask;
-   24 + len = (len + mask) & ~mask;
-   25 + len -= offset & mask;
-   26 + return len;
-   27 +}
-   28 +
-   29 #ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
-   30 #define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME
13 +++ b/drivers/mtd/mtdpart.c 31 #else
14 @@ -1222,6 +1222,24 @@ int mtd_is_partition(const struct mtd_in 32 @@ -1225,6 +1236,24 @@ int mtd_is_partition(const struct mtd_in
15 } 33 }
Line 16... Line 34...
16 EXPORT_SYMBOL_GPL(mtd_is_partition); 34 EXPORT_SYMBOL_GPL(mtd_is_partition);
17 35
Line 63... Line 81...
63 static inline uint32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd) 81 static inline uint32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd)
64 { 82 {
65 if (mtd->writesize_shift) 83 if (mtd->writesize_shift)
66 --- a/include/linux/mtd/partitions.h 84 --- a/include/linux/mtd/partitions.h
67 +++ b/include/linux/mtd/partitions.h 85 +++ b/include/linux/mtd/partitions.h
68 @@ -116,6 +116,8 @@ int mtd_is_partition(const struct mtd_in 86 @@ -115,6 +115,8 @@ int mtd_is_partition(const struct mtd_in
69 int mtd_add_partition(struct mtd_info *master, const char *name, 87 int mtd_add_partition(struct mtd_info *master, const char *name,
70 long long offset, long long length); 88 long long offset, long long length);
71 int mtd_del_partition(struct mtd_info *master, int partno); 89 int mtd_del_partition(struct mtd_info *master, int partno);
72 +struct mtd_info *mtdpart_get_master(const struct mtd_info *mtd); 90 +struct mtd_info *mtdpart_get_master(const struct mtd_info *mtd);
73 +uint64_t mtdpart_get_offset(const struct mtd_info *mtd); 91 +uint64_t mtdpart_get_offset(const struct mtd_info *mtd);
74 uint64_t mtd_get_device_size(const struct mtd_info *mtd); 92 uint64_t mtd_get_device_size(const struct mtd_info *mtd);
75 -  
-   93 extern void __weak arch_split_mtd_part(struct mtd_info *master,
76 #endif 94 const char *name, int offset, int size);