Skip to contentSkip to conversation

ide: tx4938ide: use module_platform_driver_probe()

PATCH Applied Jingoo Han 2 participants 6 messages Mar 5, 2013 – Mar 8, 2013 libata

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/3 ide: tx4938ide: use module_platform_driver_probe()

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/ide/tx4938ide.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/ide/tx4938ide.c +1 -12
index 91d49dd..ede8575 100644
@@ -203,18 +203,7 @@ static struct platform_driver tx4938ide_driver = {
 	.remove = __exit_p(tx4938ide_remove),
 };
 
-static int __init tx4938ide_init(void)
-{
-	return platform_driver_probe(&tx4938ide_driver, tx4938ide_probe);
-}
-
-static void __exit tx4938ide_exit(void)
-{
-	platform_driver_unregister(&tx4938ide_driver);
-}
-
-module_init(tx4938ide_init);
-module_exit(tx4938ide_exit);
+module_platform_driver_probe(tx4938ide_driver, tx4938ide_probe);
 
 MODULE_DESCRIPTION("TX4938 internal IDE driver");
 MODULE_LICENSE("GPL");
Signature · 1 line
1.7.2.5
author
#1 lore raw

PATCH 2/3 ide: tx4939ide: use module_platform_driver_probe()

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/ide/tx4939ide.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/ide/tx4939ide.c +1 -12
index c0ab800..4ecdee5 100644
@@ -624,18 +624,7 @@ static struct platform_driver tx4939ide_driver = {
 	.resume = tx4939ide_resume,
 };
 
-static int __init tx4939ide_init(void)
-{
-	return platform_driver_probe(&tx4939ide_driver, tx4939ide_probe);
-}
-
-static void __exit tx4939ide_exit(void)
-{
-	platform_driver_unregister(&tx4939ide_driver);
-}
-
-module_init(tx4939ide_init);
-module_exit(tx4939ide_exit);
+module_platform_driver_probe(tx4939ide_driver, tx4939ide_probe);
 
 MODULE_DESCRIPTION("TX4939 internal IDE driver");
 MODULE_LICENSE("GPL");
Signature · 1 line
1.7.2.5
author
#3 lore raw

PATCH 3/3 ide: gayle: use module_platform_driver_probe()

In reply to Jingoo Han

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/ide/gayle.c |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)
drivers/ide/gayle.c +1 -14
index 51beb85..0a8440a 100644
@@ -183,20 +183,7 @@ static struct platform_driver amiga_gayle_ide_driver = {
 	},
 };
 
-static int __init amiga_gayle_ide_init(void)
-{
-	return platform_driver_probe(&amiga_gayle_ide_driver,
-				     amiga_gayle_ide_probe);
-}
-
-module_init(amiga_gayle_ide_init);
-
-static void __exit amiga_gayle_ide_exit(void)
-{
-	platform_driver_unregister(&amiga_gayle_ide_driver);
-}
-
-module_exit(amiga_gayle_ide_exit);
+module_platform_driver_probe(amiga_gayle_ide_driver, amiga_gayle_ide_probe);
 
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:amiga-gayle-ide");
Signature · 1 line
1.7.2.5