aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-22 02:33:49 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-24 19:31:48 -0500
commitb00e126ffea89b687a83093546058b07aa054b4c (patch)
treeb9dc95d02de0cb772d40554bbce670e4086e449d
parentdcd6c92267155e70a94b3927bce681ce74b80d1f (diff)
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. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Ira W. Snyder <iws@ovro.caltech.edu> Cc: Pavan Savoy <pavan_savoy@ti.com> Cc: Donggeun Kim <dg77.kim@samsung.com> Acked-By: Pratyush Anand <pratyush.anand@st.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Pratyush Anand <pratyush.anand@st.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/misc/carma/carma-fpga.c17
-rw-r--r--drivers/misc/max8997-muic.c12
-rw-r--r--drivers/misc/spear13xx_pcie_gadget.c12
-rw-r--r--drivers/misc/ti-st/st_kim.c13
4 files changed, 4 insertions, 50 deletions
diff --git a/drivers/misc/carma/carma-fpga.c b/drivers/misc/carma/carma-fpga.c
index 14e974b2a781..366bc156e34d 100644
--- a/drivers/misc/carma/carma-fpga.c
+++ b/drivers/misc/carma/carma-fpga.c
@@ -1410,23 +1410,8 @@ static struct platform_driver data_of_driver = {
1410 }, 1410 },
1411}; 1411};
1412 1412
1413/* 1413module_platform_driver(data_of_driver);
1414 * Module Init / Exit
1415 */
1416
1417static int __init data_init(void)
1418{
1419 return platform_driver_register(&data_of_driver);
1420}
1421
1422static void __exit data_exit(void)
1423{
1424 platform_driver_unregister(&data_of_driver);
1425}
1426 1414
1427MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>"); 1415MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>");
1428MODULE_DESCRIPTION("CARMA DATA-FPGA Access Driver"); 1416MODULE_DESCRIPTION("CARMA DATA-FPGA Access Driver");
1429MODULE_LICENSE("GPL"); 1417MODULE_LICENSE("GPL");
1430
1431module_init(data_init);
1432module_exit(data_exit);
diff --git a/drivers/misc/max8997-muic.c b/drivers/misc/max8997-muic.c
index d74ef41aabd5..19591eaa492a 100644
--- a/drivers/misc/max8997-muic.c
+++ b/drivers/misc/max8997-muic.c
@@ -488,17 +488,7 @@ static struct platform_driver max8997_muic_driver = {
488 .remove = __devexit_p(max8997_muic_remove), 488 .remove = __devexit_p(max8997_muic_remove),
489}; 489};
490 490
491static int __init max8997_muic_init(void) 491module_platform_driver(max8997_muic_driver);
492{
493 return platform_driver_register(&max8997_muic_driver);
494}
495module_init(max8997_muic_init);
496
497static void __exit max8997_muic_exit(void)
498{
499 platform_driver_unregister(&max8997_muic_driver);
500}
501module_exit(max8997_muic_exit);
502 492
503MODULE_DESCRIPTION("Maxim MAX8997 MUIC driver"); 493MODULE_DESCRIPTION("Maxim MAX8997 MUIC driver");
504MODULE_AUTHOR("Donggeun Kim <dg77.kim@samsung.com>"); 494MODULE_AUTHOR("Donggeun Kim <dg77.kim@samsung.com>");
diff --git a/drivers/misc/spear13xx_pcie_gadget.c b/drivers/misc/spear13xx_pcie_gadget.c
index 43d073bc1d9c..123ed98eec3e 100644
--- a/drivers/misc/spear13xx_pcie_gadget.c
+++ b/drivers/misc/spear13xx_pcie_gadget.c
@@ -891,17 +891,7 @@ static struct platform_driver spear_pcie_gadget_driver = {
891 }, 891 },
892}; 892};
893 893
894static int __init spear_pcie_gadget_init(void) 894module_platform_driver(spear_pcie_gadget_driver);
895{
896 return platform_driver_register(&spear_pcie_gadget_driver);
897}
898module_init(spear_pcie_gadget_init);
899
900static void __exit spear_pcie_gadget_exit(void)
901{
902 platform_driver_unregister(&spear_pcie_gadget_driver);
903}
904module_exit(spear_pcie_gadget_exit);
905 895
906MODULE_ALIAS("platform:pcie-gadget-spear"); 896MODULE_ALIAS("platform:pcie-gadget-spear");
907MODULE_AUTHOR("Pratyush Anand"); 897MODULE_AUTHOR("Pratyush Anand");
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
index a7a861ceee2d..7c14f8fd98db 100644
--- a/drivers/misc/ti-st/st_kim.c
+++ b/drivers/misc/ti-st/st_kim.c
@@ -837,19 +837,8 @@ static struct platform_driver kim_platform_driver = {
837 }, 837 },
838}; 838};
839 839
840static int __init st_kim_init(void) 840module_platform_driver(kim_platform_driver);
841{
842 return platform_driver_register(&kim_platform_driver);
843}
844
845static void __exit st_kim_deinit(void)
846{
847 platform_driver_unregister(&kim_platform_driver);
848}
849
850 841
851module_init(st_kim_init);
852module_exit(st_kim_deinit);
853MODULE_AUTHOR("Pavan Savoy <pavan_savoy@ti.com>"); 842MODULE_AUTHOR("Pavan Savoy <pavan_savoy@ti.com>");
854MODULE_DESCRIPTION("Shared Transport Driver for TI BT/FM/GPS combo chips "); 843MODULE_DESCRIPTION("Shared Transport Driver for TI BT/FM/GPS combo chips ");
855MODULE_LICENSE("GPL"); 844MODULE_LICENSE("GPL");