source: trunk/package/mac80211/patches/050-compat_firmware.patch @ 27864

Last change on this file since 27864 was 27864, checked in by nbd, 5 years ago

mac80211: add missing chunks to the compat_firmware_class change

File size: 1.9 KB
  • compat/Makefile

    a b  
    11obj-m += compat.o 
    22#compat-objs := 
    33 
    4 obj-$(CONFIG_COMPAT_FIRMWARE_CLASS) += compat_firmware_class.o 
    54 
    65compat-y += main.o 
    76 
     7ifdef CONFIG_COMPAT_FIRMWARE_CLASS 
     8  compat-y += compat_firmware_class.o 
     9endif 
     10 
    811# Compat kernel compatibility code 
    912compat-$(CONFIG_COMPAT_KERNEL_2_6_14) += compat-2.6.14.o 
    1013compat-$(CONFIG_COMPAT_KERNEL_2_6_18) += compat-2.6.18.o 
  • compat/compat_firmware_class.c

    a b request_firmware_nowait( 
    729729        return 0; 
    730730} 
    731731 
    732 static int __init firmware_class_init(void) 
     732int __init firmware_class_init(void) 
    733733{ 
    734734        return class_register(&firmware_class); 
    735735} 
    736736 
    737 static void __exit firmware_class_exit(void) 
     737void __exit firmware_class_exit(void) 
    738738{ 
    739739        class_unregister(&firmware_class); 
    740740} 
    741741 
    742 fs_initcall(firmware_class_init); 
    743 module_exit(firmware_class_exit); 
    744  
    745742EXPORT_SYMBOL(release_firmware); 
    746743EXPORT_SYMBOL(request_firmware); 
    747744EXPORT_SYMBOL(request_firmware_nowait); 
  • compat/main.c

    a b module_param(compat_version, charp, 0400 
    3232MODULE_PARM_DESC(compat_version, 
    3333                 "Version of the kernel compat backport work"); 
    3434 
     35#if defined(CONFIG_FW_LOADER) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) 
     36int __init firmware_class_init(void); 
     37void __exit firmware_class_exit(void); 
     38#else 
     39static inline int firmware_class_init(void) {} 
     40static inline void firmware_class_exit(void) {} 
     41#endif 
     42 
    3543static int __init compat_init(void) 
    3644{ 
    3745        /* pm-qos for kernels <= 2.6.24, this is a no-op on newer kernels */ 
    static int __init compat_init(void) 
    4553               COMPAT_BASE_TREE " " COMPAT_BASE_TREE_VERSION 
    4654               "\n"); 
    4755 
    48         return 0; 
     56        firmware_class_init(); 
     57        return 0; 
    4958} 
    5059module_init(compat_init); 
    5160 
    5261static void __exit compat_exit(void) 
    5362{ 
    5463        compat_pm_qos_power_deinit(); 
    55  
    56         return; 
     64        firmware_class_exit(); 
    5765} 
    5866module_exit(compat_exit); 
    5967 
Note: See TracBrowser for help on using the repository browser.