函数 module_platform_driver(xxx);
#define module_platform_driver(__platform_driver) \module_driver(__platform_driver, platform_driver_register, \platform_driver_unregister)
#define module_driver(__driver, __register, __unregister, ...) \static int __init __driver##_init(void) \{ \return __register(&(__driver) , ##__VA_ARGS__); \} \module_init(__driver##_init); \static void __exit __driver##_exit(void) \{ \__unregister(&(__driver) , ##__VA_ARGS__); \} \module_exit(__driver##_exit);
static int __init gpio_pmodoled_driver_init(void){return platform_driver_register(&xxx);}module_init(xxx);static void __exit gpio_pmodoled_driver_init(void){return platform_driver_unregister(&xx);}module_exit(xxx);