Changeset 40731


Ignore:
Timestamp:
2014-05-08T23:51:36+02:00 (4 years ago)
Author:
hauke
Message:

kernel/generic: modify mtd related patches for 3.14

Function register_mtd_parser always returned 0 (at least since v3.3)
before being changed to return void in v3.14-rc1~652~93 (mtd: make
register_mtd_parser return void), so it's not needed to check the
return value of this function. Also add init flag to caller.

This fix compile errors in 3.14 kernel like:
drivers/mtd/mtdsplit_seama.c: In function 'mtdsplit_seama_init':
drivers/mtd/mtdsplit_seama.c:99:2: error: void value not ignored as it ought to be

return register_mtd_parser(&mtdsplit_seama_parser);

Signed-off-by: Zhao, Gang <gamerh2o@…>

Location:
trunk/target/linux/generic/files/drivers/mtd
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic/files/drivers/mtd/mtdsplit_lzma.c

    r39387 r40731  
    8787}; 
    8888 
    89 static int 
    90 mtdsplit_lzma_init(void) 
     89static int __init mtdsplit_lzma_init(void) 
    9190{ 
    92         return register_mtd_parser(&mtdsplit_lzma_parser); 
     91        register_mtd_parser(&mtdsplit_lzma_parser); 
     92 
     93        return 0; 
    9394} 
    9495 
  • trunk/target/linux/generic/files/drivers/mtd/mtdsplit_seama.c

    r38114 r40731  
    9494}; 
    9595 
    96 static int 
    97 mtdsplit_seama_init(void) 
     96static int __init mtdsplit_seama_init(void) 
    9897{ 
    99         return register_mtd_parser(&mtdsplit_seama_parser); 
     98        register_mtd_parser(&mtdsplit_seama_parser); 
     99 
     100        return 0; 
    100101} 
    101102 
  • trunk/target/linux/generic/files/drivers/mtd/mtdsplit_squashfs.c

    r38110 r40731  
    6363}; 
    6464 
    65 static int 
    66 mtdsplit_squashfs_init(void) 
     65static int __init mtdsplit_squashfs_init(void) 
    6766{ 
    68         return register_mtd_parser(&mtdsplit_squashfs_parser); 
     67        register_mtd_parser(&mtdsplit_squashfs_parser); 
     68 
     69        return 0; 
    6970} 
    7071 
  • trunk/target/linux/generic/files/drivers/mtd/mtdsplit_uimage.c

    r38594 r40731  
    272272}; 
    273273 
    274 static int mtdsplit_uimage_init(void) 
    275 { 
    276         int ret; 
    277  
    278         ret = register_mtd_parser(&uimage_generic_parser); 
    279         if (ret) 
    280                 return ret; 
    281  
    282         ret = register_mtd_parser(&uimage_netgear_parser); 
    283         if (ret) 
    284                 goto err_unregister_generic; 
     274static int __init mtdsplit_uimage_init(void) 
     275{ 
     276        register_mtd_parser(&uimage_generic_parser); 
     277        register_mtd_parser(&uimage_netgear_parser); 
    285278 
    286279        return 0; 
    287  
    288 err_unregister_generic: 
    289         deregister_mtd_parser(&uimage_generic_parser); 
    290         return ret; 
    291280} 
    292281 
  • trunk/target/linux/generic/files/drivers/mtd/myloader.c

    r39382 r40731  
    165165static int __init myloader_mtd_parser_init(void) 
    166166{ 
    167         return register_mtd_parser(&myloader_mtd_parser); 
     167        register_mtd_parser(&myloader_mtd_parser); 
     168 
     169        return 0; 
    168170} 
    169171 
Note: See TracChangeset for help on using the changeset viewer.