Skip to contentSkip to conversation

pcmcia: convert drivers/pcmcia/* to use module_platform_driver()

PATCH Applied Axel Lin 7 participants 7 messages Nov 27, 2011 – Feb 5, 2012

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 pcmcia: convert drivers/pcmcia/* to use module_platform_driver()

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

Cc Michael Hennerich <[email protected]>
Cc Manuel Lauss <[email protected]>
Cc Olof Johansson <[email protected]>
Cc Marc Zyngier <[email protected]>
---
 drivers/pcmcia/bfin_cf_pcmcia.c |   13 +------------
 drivers/pcmcia/db1xxx_ss.c      |   13 +------------
 drivers/pcmcia/electra_cf.c     |   12 +-----------
 drivers/pcmcia/m8xx_pcmcia.c    |   13 +------------
 drivers/pcmcia/pxa2xx_viper.c   |   13 +------------
 drivers/pcmcia/xxs1500_ss.c     |   13 +------------
 6 files changed, 6 insertions(+), 71 deletions(-)
drivers/pcmcia/bfin_cf_pcmcia.c +1 -12
index 4922139..ac1a223 100644
@@ -310,18 +310,7 @@ static struct platform_driver bfin_cf_driver = {
 	.remove = __devexit_p(bfin_cf_remove),
 };
 
-static int __init bfin_cf_init(void)
-{
-	return platform_driver_register(&bfin_cf_driver);
-}
-
-static void __exit bfin_cf_exit(void)
-{
-	platform_driver_unregister(&bfin_cf_driver);
-}
-
-module_init(bfin_cf_init);
-module_exit(bfin_cf_exit);
+module_platform_driver(bfin_cf_driver);
 
 MODULE_AUTHOR("Michael Hennerich <[email protected]>");
 MODULE_DESCRIPTION("BFIN CF/PCMCIA Driver");
drivers/pcmcia/db1xxx_ss.c +1 -12
index 5b7c227..ba299a2 100644
@@ -580,18 +580,7 @@ static struct platform_driver db1x_pcmcia_socket_driver = {
 	.remove		= __devexit_p(db1x_pcmcia_socket_remove),
 };
 
-int __init db1x_pcmcia_socket_load(void)
-{
-	return platform_driver_register(&db1x_pcmcia_socket_driver);
-}
-
-void  __exit db1x_pcmcia_socket_unload(void)
-{
-	platform_driver_unregister(&db1x_pcmcia_socket_driver);
-}
-
-module_init(db1x_pcmcia_socket_load);
-module_exit(db1x_pcmcia_socket_unload);
+module_platform_driver(db1x_pcmcia_socket_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("PCMCIA Socket Services for Alchemy Db/Pb1x00 boards");
drivers/pcmcia/electra_cf.c +1 -11
index 06ad3e5..7647d23 100644
@@ -365,17 +365,7 @@ static struct platform_driver electra_cf_driver = {
 	.remove   = electra_cf_remove,
 };
 
-static int __init electra_cf_init(void)
-{
-	return platform_driver_register(&electra_cf_driver);
-}
-module_init(electra_cf_init);
-
-static void __exit electra_cf_exit(void)
-{
-	platform_driver_unregister(&electra_cf_driver);
-}
-module_exit(electra_cf_exit);
+module_platform_driver(electra_cf_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR ("Olof Johansson <[email protected]>");
drivers/pcmcia/m8xx_pcmcia.c +1 -12
index 271a590..b120928 100644
@@ -1304,15 +1304,4 @@ static struct platform_driver m8xx_pcmcia_driver = {
 	.remove = m8xx_remove,
 };
 
-static int __init m8xx_init(void)
-{
-	return platform_driver_register(&m8xx_pcmcia_driver);
-}
-
-static void __exit m8xx_exit(void)
-{
-	platform_driver_unregister(&m8xx_pcmcia_driver);
-}
-
-module_init(m8xx_init);
-module_exit(m8xx_exit);
+module_platform_driver(m8xx_pcmcia_driver);
drivers/pcmcia/pxa2xx_viper.c +1 -12
index 1064b1c..44f5c7f 100644
@@ -204,18 +204,7 @@ static struct platform_driver viper_pcmcia_driver = {
 	.id_table	= viper_pcmcia_id_table,
 };
 
-static int __init viper_pcmcia_init(void)
-{
-	return platform_driver_register(&viper_pcmcia_driver);
-}
-
-static void __exit viper_pcmcia_exit(void)
-{
-	return platform_driver_unregister(&viper_pcmcia_driver);
-}
-
-module_init(viper_pcmcia_init);
-module_exit(viper_pcmcia_exit);
+module_platform_driver(viper_pcmcia_driver);
 
 MODULE_DEVICE_TABLE(platform, viper_pcmcia_id_table);
 MODULE_LICENSE("GPL");
drivers/pcmcia/xxs1500_ss.c +1 -12
index 379f421..1ceff69 100644
@@ -321,18 +321,7 @@ static struct platform_driver xxs1500_pcmcia_socket_driver = {
 	.remove		= __devexit_p(xxs1500_pcmcia_remove),
 };
 
-int __init xxs1500_pcmcia_socket_load(void)
-{
-	return platform_driver_register(&xxs1500_pcmcia_socket_driver);
-}
-
-void  __exit xxs1500_pcmcia_socket_unload(void)
-{
-	platform_driver_unregister(&xxs1500_pcmcia_socket_driver);
-}
-
-module_init(xxs1500_pcmcia_socket_load);
-module_exit(xxs1500_pcmcia_socket_unload);
+module_platform_driver(xxs1500_pcmcia_socket_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("PCMCIA Socket Services for MyCable XXS1500 systems");
Signature · 1 line
1.7.5.4
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Axel Lin

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

Signature · 2 lines
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Acked-by on v1 1/1
#2 lore raw
In reply to Axel Lin
Quoted 9 lines · Axel Lin

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

Cc Michael Hennerich <[email protected]>
Cc Manuel Lauss <[email protected]>
Cc Olof Johansson <[email protected]>
Cc Marc Zyngier <[email protected]>

-Olof

Acked-by on v1 1/1
#3 lore raw
In reply to Axel Lin
Quoted 9 lines · Axel Lin

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

Cc Michael Hennerich<[email protected]>
Cc Manuel Lauss<[email protected]>
Cc Olof Johansson<[email protected]>
Cc Marc Zyngier<[email protected]>
Signature · 8 lines
Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
Margaret Seif
Acked-by on v1 1/1
#4 lore raw
In reply to Axel Lin
Quoted 9 lines · Axel Lin

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

Cc Michael Hennerich <[email protected]>
Cc Manuel Lauss <[email protected]>
Cc Olof Johansson <[email protected]>
Cc Marc Zyngier <[email protected]>
Quoted 9 lines
---
 drivers/pcmcia/bfin_cf_pcmcia.c |   13 +------------
 drivers/pcmcia/db1xxx_ss.c      |   13 +------------
 drivers/pcmcia/electra_cf.c     |   12 +-----------
 drivers/pcmcia/m8xx_pcmcia.c    |   13 +------------
 drivers/pcmcia/pxa2xx_viper.c   |   13 +------------
 drivers/pcmcia/xxs1500_ss.c     |   13 +------------
 6 files changed, 6 insertions(+), 71 deletions(-)

For the viper part:

Signature · 1 line
Who you jivin' with that Cosmik Debris?
Acked-by on v1 1/1
#5 lore raw
In reply to Axel Lin
Quoted 9 lines · Axel Lin

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

Cc Michael Hennerich <[email protected]>
Cc Manuel Lauss <[email protected]>
Cc Olof Johansson <[email protected]>
Cc Marc Zyngier <[email protected]>
Quoted 8 lines

---
 drivers/pcmcia/bfin_cf_pcmcia.c |   13 +------------ drivers/pcmcia/db1xxx_ss.c      |   13 +------------ drivers/pcmcia/electra_cf.c     |   12 +----------- drivers/pcmcia/m8xx_pcmcia.c    |   13 +------------ drivers/pcmcia/pxa2xx_viper.c   |   13 +------------ drivers/pcmcia/xxs1500_ss.c     |   13 +------------

 6 files changed, 6 insertions(+), 71 deletions(-)

For the db1xxx_ss.c part: