Ignore:
Timestamp:
2011-08-01T19:52:07+02:00 (5 years ago)
Author:
nbd
Message:

mac80211: add missing chunks to the compat_firmware_class change

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/mac80211/patches/050-compat_firmware.patch

    r27863 r27864  
    1616 compat-$(CONFIG_COMPAT_KERNEL_2_6_14) += compat-2.6.14.o 
    1717 compat-$(CONFIG_COMPAT_KERNEL_2_6_18) += compat-2.6.18.o 
     18--- a/compat/compat_firmware_class.c 
     19+++ b/compat/compat_firmware_class.c 
     20@@ -729,19 +729,16 @@ request_firmware_nowait( 
     21        return 0; 
     22 } 
     23  
     24-static int __init firmware_class_init(void) 
     25+int __init firmware_class_init(void) 
     26 { 
     27        return class_register(&firmware_class); 
     28 } 
     29  
     30-static void __exit firmware_class_exit(void) 
     31+void __exit firmware_class_exit(void) 
     32 { 
     33        class_unregister(&firmware_class); 
     34 } 
     35  
     36-fs_initcall(firmware_class_init); 
     37-module_exit(firmware_class_exit); 
     38- 
     39 EXPORT_SYMBOL(release_firmware); 
     40 EXPORT_SYMBOL(request_firmware); 
     41 EXPORT_SYMBOL(request_firmware_nowait); 
     42--- a/compat/main.c 
     43+++ b/compat/main.c 
     44@@ -32,6 +32,14 @@ module_param(compat_version, charp, 0400 
     45 MODULE_PARM_DESC(compat_version, 
     46                 "Version of the kernel compat backport work"); 
     47  
     48+#if defined(CONFIG_FW_LOADER) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) 
     49+int __init firmware_class_init(void); 
     50+void __exit firmware_class_exit(void); 
     51+#else 
     52+static inline int firmware_class_init(void) {} 
     53+static inline void firmware_class_exit(void) {} 
     54+#endif 
     55+ 
     56 static int __init compat_init(void) 
     57 { 
     58        /* pm-qos for kernels <= 2.6.24, this is a no-op on newer kernels */ 
     59@@ -45,15 +53,15 @@ static int __init compat_init(void) 
     60               COMPAT_BASE_TREE " " COMPAT_BASE_TREE_VERSION 
     61               "\n"); 
     62  
     63-        return 0; 
     64+       firmware_class_init(); 
     65+       return 0; 
     66 } 
     67 module_init(compat_init); 
     68  
     69 static void __exit compat_exit(void) 
     70 { 
     71        compat_pm_qos_power_deinit(); 
     72- 
     73-        return; 
     74+       firmware_class_exit(); 
     75 } 
     76 module_exit(compat_exit); 
     77  
Note: See TracChangeset for help on using the changeset viewer.