mmc: atmel-mci: stop using specific initcall
authorludovic.desroches@atmel.com <ludovic.desroches@atmel.com>
Mon, 1 Dec 2014 14:35:08 +0000 (15:35 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 2 Dec 2014 10:01:35 +0000 (11:01 +0100)
No more use late initcall to manage probing order. Use probe deferring
if needed.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/atmel-mci.c

index f16d019edb51e8179f1ca2d0e5b7584616566037..00f60886c1e5962a1add6cb229a5d8f66e88a30a 100644 (file)
@@ -2565,6 +2565,7 @@ static const struct dev_pm_ops atmci_dev_pm_ops = {
 };
 
 static struct platform_driver atmci_driver = {
+       .probe          = atmci_probe,
        .remove         = atmci_remove,
        .driver         = {
                .name           = "atmel_mci",
@@ -2572,19 +2573,7 @@ static struct platform_driver atmci_driver = {
                .pm             = &atmci_dev_pm_ops,
        },
 };
-
-static int __init atmci_init(void)
-{
-       return platform_driver_probe(&atmci_driver, atmci_probe);
-}
-
-static void __exit atmci_exit(void)
-{
-       platform_driver_unregister(&atmci_driver);
-}
-
-late_initcall(atmci_init); /* try to load after dma driver when built-in */
-module_exit(atmci_exit);
+module_platform_driver(atmci_driver);
 
 MODULE_DESCRIPTION("Atmel Multimedia Card Interface driver");
 MODULE_AUTHOR("Haavard Skinnemoen (Atmel)");