* [PATCH] MISC: convert drivers/misc/* to use module_platform_driver()
@ 2011-11-25 4:24 Axel Lin
2011-11-25 9:48 ` Arnd Bergmann
2011-11-27 14:23 ` Pratyush Anand
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2011-11-25 4:24 UTC (permalink / raw)
To: linux-kernel
Cc: Ira W. Snyder, Pratyush Anand, Pavan Savoy, Arnd Bergmann,
Greg Kroah-Hartman
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 <iws@ovro.caltech.edu>
Cc: Pratyush Anand <pratyush.anand@st.com>
Cc: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
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(-)
diff --git a/drivers/misc/carma/carma-fpga.c b/drivers/misc/carma/carma-fpga.c
index 14e974b2..366bc15 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 = {
},
};
-/*
- * 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 <iws@ovro.caltech.edu>");
MODULE_DESCRIPTION("CARMA DATA-FPGA Access Driver");
MODULE_LICENSE("GPL");
-
-module_init(data_init);
-module_exit(data_exit);
diff --git a/drivers/misc/spear13xx_pcie_gadget.c b/drivers/misc/spear13xx_pcie_gadget.c
index 43d073b..123ed98 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 = {
},
};
-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");
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
index 43ef8d1..533f426 100644
--- a/drivers/misc/ti-st/st_kim.c
+++ b/drivers/misc/ti-st/st_kim.c
@@ -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 <pavan_savoy@ti.com>");
MODULE_DESCRIPTION("Shared Transport Driver for TI BT/FM/GPS combo chips ");
MODULE_LICENSE("GPL");
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MISC: convert drivers/misc/* to use module_platform_driver()
2011-11-25 4:24 [PATCH] MISC: convert drivers/misc/* to use module_platform_driver() Axel Lin
@ 2011-11-25 9:48 ` Arnd Bergmann
2011-11-27 14:23 ` Pratyush Anand
1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2011-11-25 9:48 UTC (permalink / raw)
To: Axel Lin
Cc: linux-kernel, Ira W. Snyder, Pratyush Anand, Pavan Savoy,
Greg Kroah-Hartman
On Friday 25 November 2011, Axel Lin wrote:
>
> 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 <iws@ovro.caltech.edu>
> Cc: Pratyush Anand <pratyush.anand@st.com>
> Cc: Pavan Savoy <pavan_savoy@ti.com>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] MISC: convert drivers/misc/* to use module_platform_driver()
2011-11-25 4:24 [PATCH] MISC: convert drivers/misc/* to use module_platform_driver() Axel Lin
2011-11-25 9:48 ` Arnd Bergmann
@ 2011-11-27 14:23 ` Pratyush Anand
1 sibling, 0 replies; 3+ messages in thread
From: Pratyush Anand @ 2011-11-27 14:23 UTC (permalink / raw)
To: Axel Lin
Cc: linux-kernel, Ira W. Snyder, Pavan Savoy, Arnd Bergmann,
Greg Kroah-Hartman
On 11/25/2011 9:54 AM, Axel Lin wrote:
> 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<iws@ovro.caltech.edu>
> Cc: Pratyush Anand<pratyush.anand@st.com>
> Cc: Pavan Savoy<pavan_savoy@ti.com>
> Signed-off-by: Axel Lin<axel.lin@gmail.com>
Acked-by: Pratyush Anand <pratyush.anand@st.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-27 14:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-25 4:24 [PATCH] MISC: convert drivers/misc/* to use module_platform_driver() Axel Lin
2011-11-25 9:48 ` Arnd Bergmann
2011-11-27 14:23 ` Pratyush Anand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).