MISC: convert drivers/misc/* to use module_platform_driver()
PATCH 1/1 MISC: convert drivers/misc/* to use module_platform_driver()
This patch converts the drivers in drivers/misc/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler.
Cc Ira W. Snyder <[email protected]>
Cc Pratyush Anand <[email protected]>
Cc Pavan Savoy <[email protected]>
Signed-off-by Axel Lin <[email protected]>
--- drivers/misc/carma/carma-fpga.c | 17 +---------------- drivers/misc/spear13xx_pcie_gadget.c | 12 +----------- drivers/misc/ti-st/st_kim.c | 13 +------------ 3 files changed, 3 insertions(+), 39 deletions(-)
drivers/misc/carma/carma-fpga.c +1 -16
@@ -1410,23 +1410,8 @@ static struct platform_driver data_of_driver = { }, }; -/* -* Module Init / Exit -*/ - -static int __init data_init (void ) -{ -return platform_driver_register (&data_of_driver); -} - -static void __exit data_exit(void) -{ -platform_driver_unregister (&data_of_driver); -} +module_platform_driver (data_of_driver);MODULE_AUTHOR ("Ira W. Snyder <[email protected]>" );MODULE_DESCRIPTION ("CARMA DATA-FPGA Access Driver" );MODULE_LICENSE ("GPL" ); - -module_init (data_init); -module_exit (data_exit);
drivers/misc/spear13xx_pcie_gadget.c +1 -11
@@ -891,17 +891,7 @@ static struct platform_driver spear_pcie_gadget_driver = { }, }; -static int __init spear_pcie_gadget_init (void ) -{ -return platform_driver_register (&spear_pcie_gadget_driver); -} -module_init (spear_pcie_gadget_init); - -static void __exit spear_pcie_gadget_exit(void) -{ -platform_driver_unregister (&spear_pcie_gadget_driver); -} -module_exit (spear_pcie_gadget_exit); +module_platform_driver (spear_pcie_gadget_driver);MODULE_ALIAS ("platform:pcie-gadget-spear" );MODULE_AUTHOR ("Pratyush Anand" );
drivers/misc/ti-st/st_kim.c +1 -12
@@ -813,19 +813,8 @@ static struct platform_driver kim_platform_driver = { }, }; -static int __init st_kim_init (void ) -{ -return platform_driver_register (&kim_platform_driver); -} - -static void __exit st_kim_deinit(void) -{ -platform_driver_unregister (&kim_platform_driver); -} - +module_platform_driver (kim_platform_driver); -module_init (st_kim_init); -module_exit (st_kim_deinit);MODULE_AUTHOR ("Pavan Savoy <[email protected]>" );MODULE_DESCRIPTION ("Shared Transport Driver for TI BT/FM/GPS combo chips " );MODULE_LICENSE ("GPL" );
Signature · 1 line
1.7.5.4
Quoted 9 lines · Axel Lin
This patch converts the drivers in
drivers/misc/*to use themodule_platform_driver()macro which makes the code smaller and a bit simpler.Cc Ira W. Snyder <[email protected]>Cc Pratyush Anand <[email protected]>Cc Pavan Savoy <[email protected]>Signed-off-by Axel Lin <[email protected]>
Acked-by Arnd Bergmann <[email protected]>
Quoted 8 lines · Axel Lin
This patch converts the drivers in
drivers/misc/*to use themodule_platform_driver()macro which makes the code smaller and a bit simpler.Cc Ira W. Snyder<[email protected]>Cc Pratyush Anand<[email protected]>Cc Pavan Savoy<[email protected]>Signed-off-by Axel Lin<[email protected]>
Acked-by Pratyush Anand <[email protected]>