diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-01-22 02:33:49 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-24 19:31:48 -0500 |
commit | b00e126ffea89b687a83093546058b07aa054b4c (patch) | |
tree | b9dc95d02de0cb772d40554bbce670e4086e449d | |
parent | dcd6c92267155e70a94b3927bce681ce74b80d1f (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.c | 17 | ||||
-rw-r--r-- | drivers/misc/max8997-muic.c | 12 | ||||
-rw-r--r-- | drivers/misc/spear13xx_pcie_gadget.c | 12 | ||||
-rw-r--r-- | drivers/misc/ti-st/st_kim.c | 13 |
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 | /* | 1413 | module_platform_driver(data_of_driver); |
1414 | * Module Init / Exit | ||
1415 | */ | ||
1416 | |||
1417 | static int __init data_init(void) | ||
1418 | { | ||
1419 | return platform_driver_register(&data_of_driver); | ||
1420 | } | ||
1421 | |||
1422 | static void __exit data_exit(void) | ||
1423 | { | ||
1424 | platform_driver_unregister(&data_of_driver); | ||
1425 | } | ||
1426 | 1414 | ||
1427 | MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>"); | 1415 | MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>"); |
1428 | MODULE_DESCRIPTION("CARMA DATA-FPGA Access Driver"); | 1416 | MODULE_DESCRIPTION("CARMA DATA-FPGA Access Driver"); |
1429 | MODULE_LICENSE("GPL"); | 1417 | MODULE_LICENSE("GPL"); |
1430 | |||
1431 | module_init(data_init); | ||
1432 | module_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 | ||
491 | static int __init max8997_muic_init(void) | 491 | module_platform_driver(max8997_muic_driver); |
492 | { | ||
493 | return platform_driver_register(&max8997_muic_driver); | ||
494 | } | ||
495 | module_init(max8997_muic_init); | ||
496 | |||
497 | static void __exit max8997_muic_exit(void) | ||
498 | { | ||
499 | platform_driver_unregister(&max8997_muic_driver); | ||
500 | } | ||
501 | module_exit(max8997_muic_exit); | ||
502 | 492 | ||
503 | MODULE_DESCRIPTION("Maxim MAX8997 MUIC driver"); | 493 | MODULE_DESCRIPTION("Maxim MAX8997 MUIC driver"); |
504 | MODULE_AUTHOR("Donggeun Kim <dg77.kim@samsung.com>"); | 494 | MODULE_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 | ||
894 | static int __init spear_pcie_gadget_init(void) | 894 | module_platform_driver(spear_pcie_gadget_driver); |
895 | { | ||
896 | return platform_driver_register(&spear_pcie_gadget_driver); | ||
897 | } | ||
898 | module_init(spear_pcie_gadget_init); | ||
899 | |||
900 | static void __exit spear_pcie_gadget_exit(void) | ||
901 | { | ||
902 | platform_driver_unregister(&spear_pcie_gadget_driver); | ||
903 | } | ||
904 | module_exit(spear_pcie_gadget_exit); | ||
905 | 895 | ||
906 | MODULE_ALIAS("platform:pcie-gadget-spear"); | 896 | MODULE_ALIAS("platform:pcie-gadget-spear"); |
907 | MODULE_AUTHOR("Pratyush Anand"); | 897 | MODULE_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 | ||
840 | static int __init st_kim_init(void) | 840 | module_platform_driver(kim_platform_driver); |
841 | { | ||
842 | return platform_driver_register(&kim_platform_driver); | ||
843 | } | ||
844 | |||
845 | static void __exit st_kim_deinit(void) | ||
846 | { | ||
847 | platform_driver_unregister(&kim_platform_driver); | ||
848 | } | ||
849 | |||
850 | 841 | ||
851 | module_init(st_kim_init); | ||
852 | module_exit(st_kim_deinit); | ||
853 | MODULE_AUTHOR("Pavan Savoy <pavan_savoy@ti.com>"); | 842 | MODULE_AUTHOR("Pavan Savoy <pavan_savoy@ti.com>"); |
854 | MODULE_DESCRIPTION("Shared Transport Driver for TI BT/FM/GPS combo chips "); | 843 | MODULE_DESCRIPTION("Shared Transport Driver for TI BT/FM/GPS combo chips "); |
855 | MODULE_LICENSE("GPL"); | 844 | MODULE_LICENSE("GPL"); |