Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sbus: convert drivers/sbus/char/* to use module_platform_driver()

This patch converts the drivers in drivers/sbus/char/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Axel Lin and committed by
David S. Miller
dbf2b92d e4104710

+5 -57
+1 -12
drivers/sbus/char/bbc_i2c.c
··· 416 416 .remove = __devexit_p(bbc_i2c_remove), 417 417 }; 418 418 419 - static int __init bbc_i2c_init(void) 420 - { 421 - return platform_driver_register(&bbc_i2c_driver); 422 - } 423 - 424 - static void __exit bbc_i2c_exit(void) 425 - { 426 - platform_driver_unregister(&bbc_i2c_driver); 427 - } 428 - 429 - module_init(bbc_i2c_init); 430 - module_exit(bbc_i2c_exit); 419 + module_platform_driver(bbc_i2c_driver); 431 420 432 421 MODULE_LICENSE("GPL");
+1 -12
drivers/sbus/char/display7seg.c
··· 275 275 .remove = __devexit_p(d7s_remove), 276 276 }; 277 277 278 - static int __init d7s_init(void) 279 - { 280 - return platform_driver_register(&d7s_driver); 281 - } 282 - 283 - static void __exit d7s_exit(void) 284 - { 285 - platform_driver_unregister(&d7s_driver); 286 - } 287 - 288 - module_init(d7s_init); 289 - module_exit(d7s_exit); 278 + module_platform_driver(d7s_driver);
+1 -11
drivers/sbus/char/envctrl.c
··· 1138 1138 .remove = __devexit_p(envctrl_remove), 1139 1139 }; 1140 1140 1141 - static int __init envctrl_init(void) 1142 - { 1143 - return platform_driver_register(&envctrl_driver); 1144 - } 1141 + module_platform_driver(envctrl_driver); 1145 1142 1146 - static void __exit envctrl_exit(void) 1147 - { 1148 - platform_driver_unregister(&envctrl_driver); 1149 - } 1150 - 1151 - module_init(envctrl_init); 1152 - module_exit(envctrl_exit); 1153 1143 MODULE_LICENSE("GPL");
+1 -11
drivers/sbus/char/flash.c
··· 216 216 .remove = __devexit_p(flash_remove), 217 217 }; 218 218 219 - static int __init flash_init(void) 220 - { 221 - return platform_driver_register(&flash_driver); 222 - } 219 + module_platform_driver(flash_driver); 223 220 224 - static void __exit flash_cleanup(void) 225 - { 226 - platform_driver_unregister(&flash_driver); 227 - } 228 - 229 - module_init(flash_init); 230 - module_exit(flash_cleanup); 231 221 MODULE_LICENSE("GPL");
+1 -11
drivers/sbus/char/uctrl.c
··· 435 435 }; 436 436 437 437 438 - static int __init uctrl_init(void) 439 - { 440 - return platform_driver_register(&uctrl_driver); 441 - } 438 + module_platform_driver(uctrl_driver); 442 439 443 - static void __exit uctrl_exit(void) 444 - { 445 - platform_driver_unregister(&uctrl_driver); 446 - } 447 - 448 - module_init(uctrl_init); 449 - module_exit(uctrl_exit); 450 440 MODULE_LICENSE("GPL");