mmc: cavium-octeon: Convert to use module_platform_driver
authorAxel Lin <axel.lin@ingics.com>
Sat, 19 Aug 2017 13:06:11 +0000 (21:06 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 30 Aug 2017 13:03:38 +0000 (15:03 +0200)
Get rid of boilerplate code by using module_platform_driver macro.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Jan Glauber <jglauber@cavium.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/cavium-octeon.c

index 951d2cdd7888b0d68f9994298572759162277682..22aded1065ae8bb5773ada8d03813a166073210d 100644 (file)
@@ -342,18 +342,7 @@ static struct platform_driver octeon_mmc_driver = {
        },
 };
 
-static int __init octeon_mmc_init(void)
-{
-       return platform_driver_register(&octeon_mmc_driver);
-}
-
-static void __exit octeon_mmc_cleanup(void)
-{
-       platform_driver_unregister(&octeon_mmc_driver);
-}
-
-module_init(octeon_mmc_init);
-module_exit(octeon_mmc_cleanup);
+module_platform_driver(octeon_mmc_driver);
 
 MODULE_AUTHOR("Cavium Inc. <support@cavium.com>");
 MODULE_DESCRIPTION("Low-level driver for Cavium OCTEON MMC/SSD card");