OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 14... Line 14...
14 #include <linux/kernel.h> 14 #include <linux/kernel.h>
15 #include <linux/slab.h> 15 #include <linux/slab.h>
16 #include <linux/vmalloc.h> 16 #include <linux/vmalloc.h>
17 #include <linux/mtd/mtd.h> 17 #include <linux/mtd/mtd.h>
18 #include <linux/mtd/partitions.h> 18 #include <linux/mtd/partitions.h>
19 #include <linux/version.h> -  
20 #include <linux/byteorder/generic.h> 19 #include <linux/byteorder/generic.h>
Line 21... Line 20...
21   20  
Line 22... Line 21...
22 #include "mtdsplit.h" 21 #include "mtdsplit.h"
Line 238... Line 237...
238 { 237 {
239 return __mtdsplit_parse_uimage(master, pparts, data, 238 return __mtdsplit_parse_uimage(master, pparts, data,
240 uimage_verify_default); 239 uimage_verify_default);
241 } 240 }
Line 242... Line -...
242   -  
243 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) -  
244 static const struct of_device_id mtdsplit_uimage_of_match_table[] = { -  
245 { .compatible = "denx,uimage" }, -  
246 {}, -  
247 }; -  
248 #endif -  
249   241  
250 static struct mtd_part_parser uimage_generic_parser = { 242 static struct mtd_part_parser uimage_generic_parser = {
251 .owner = THIS_MODULE, 243 .owner = THIS_MODULE,
252 .name = "uimage-fw", -  
253 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) -  
254 .of_match_table = mtdsplit_uimage_of_match_table, -  
255 #endif 244 .name = "uimage-fw",
256 .parse_fn = mtdsplit_uimage_parse_generic, 245 .parse_fn = mtdsplit_uimage_parse_generic,
257 .type = MTD_PARSER_TYPE_FIRMWARE, 246 .type = MTD_PARSER_TYPE_FIRMWARE,
Line 258... Line 247...
258 }; 247 };
Line 305... Line 294...
305 { 294 {
306 return __mtdsplit_parse_uimage(master, pparts, data, 295 return __mtdsplit_parse_uimage(master, pparts, data,
307 uimage_verify_wndr3700); 296 uimage_verify_wndr3700);
308 } 297 }
Line 309... Line -...
309   -  
310 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) -  
311 static const struct of_device_id mtdsplit_uimage_netgear_of_match_table[] = { -  
312 { .compatible = "netgear,uimage" }, -  
313 {}, -  
314 }; -  
315 #endif -  
316   298  
317 static struct mtd_part_parser uimage_netgear_parser = { 299 static struct mtd_part_parser uimage_netgear_parser = {
318 .owner = THIS_MODULE, 300 .owner = THIS_MODULE,
319 .name = "netgear-fw", -  
320 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) -  
321 .of_match_table = mtdsplit_uimage_netgear_of_match_table, -  
322 #endif 301 .name = "netgear-fw",
323 .parse_fn = mtdsplit_uimage_parse_netgear, 302 .parse_fn = mtdsplit_uimage_parse_netgear,
324 .type = MTD_PARSER_TYPE_FIRMWARE, 303 .type = MTD_PARSER_TYPE_FIRMWARE,
Line 325... Line 304...
325 }; 304 };
Line 357... Line 336...
357 { 336 {
358 return __mtdsplit_parse_uimage(master, pparts, data, 337 return __mtdsplit_parse_uimage(master, pparts, data,
359 uimage_find_edimax); 338 uimage_find_edimax);
360 } 339 }
Line 361... Line -...
361   -  
362 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) -  
363 static const struct of_device_id mtdsplit_uimage_edimax_of_match_table[] = { -  
364 { .compatible = "edimax,uimage" }, -  
365 {}, -  
366 }; -  
367 #endif -  
368   340  
369 static struct mtd_part_parser uimage_edimax_parser = { 341 static struct mtd_part_parser uimage_edimax_parser = {
370 .owner = THIS_MODULE, 342 .owner = THIS_MODULE,
371 .name = "edimax-fw", -  
372 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) -  
373 .of_match_table = mtdsplit_uimage_edimax_of_match_table, -  
374 #endif 343 .name = "edimax-fw",
375 .parse_fn = mtdsplit_uimage_parse_edimax, 344 .parse_fn = mtdsplit_uimage_parse_edimax,
376 .type = MTD_PARSER_TYPE_FIRMWARE, 345 .type = MTD_PARSER_TYPE_FIRMWARE,
Line 377... Line 346...
377 }; 346 };