source: trunk/package/mac80211/patches/301-add-module_pci_driver-to-compat-3.4.patch @ 31438

Last change on this file since 31438 was 31438, checked in by juhosg, 4 years ago

mac80211: add backport of the module_pci_driver macro

That is required by various PCI drivers.

File size: 822 bytes
  • include/linux/compat-3.4.h

    a b static inline void eth_hw_addr_random(st 
    6262#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)) */ 
    6363#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)) */ 
    6464 
     65/** 
     66 * module_pci_driver() - Helper macro for registering a PCI driver 
     67 * @__pci_driver: pci_driver struct 
     68 * 
     69 * Helper macro for PCI drivers which do not do anything special in module 
     70 * init/exit. This eliminates a lot of boilerplate. Each module may only 
     71 * use this macro once, and calling it replaces module_init() and module_exit() 
     72 */ 
     73#define module_pci_driver(__pci_driver) \ 
     74        module_driver(__pci_driver, pci_register_driver, \ 
     75                      pci_unregister_driver) 
     76 
    6577#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) */ 
    6678 
    6779#endif /* LINUX_5_4_COMPAT_H */ 
Note: See TracBrowser for help on using the repository browser.