Thread (39 messages) 39 messages, 8 authors, 2013-04-09

Lifecycle

  1. Posted Fabio Porcedda <fabio.porcedda@gmail.com>

[PATCH 07/10] drivers: memory: use module_platform_driver_probe()

From: Fabio Porcedda <hidden>
Date: 2013-03-14 13:14:20
Also in: linux-arm-kernel, linux-ide, linux-input, linux-media, lkml
Subsystem: arm/texas instrument aemif/emif drivers, memory controller drivers, the rest · Maintainers: Santosh Shilimkar, Krzysztof Kozlowski, Linus Torvalds

This patch converts the drivers to use the
module_platform_driver_probe() macro which makes the code smaller and
a bit simpler.

Signed-off-by: Fabio Porcedda <redacted>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Benoit Cousson <redacted>
Cc: Aneesh V <redacted>
---
 drivers/memory/emif.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/memory/emif.c b/drivers/memory/emif.c
index df08736..ecbc1a9 100644
--- a/drivers/memory/emif.c
+++ b/drivers/memory/emif.c
@@ -1841,18 +1841,8 @@ static struct platform_driver emif_driver = {
 	},
 };
 
-static int __init_or_module emif_register(void)
-{
-	return platform_driver_probe(&emif_driver, emif_probe);
-}
-
-static void __exit emif_unregister(void)
-{
-	platform_driver_unregister(&emif_driver);
-}
+module_platform_driver_probe(emif_driver, emif_probe);
 
-module_init(emif_register);
-module_exit(emif_unregister);
 MODULE_DESCRIPTION("TI EMIF SDRAM Controller Driver");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("platform:emif");
-- 
1.8.1.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help