Blackfin: dpmc: use module_platform_driver macro
authorSrinivas Kandagatla <srinivas.kandagatla@st.com>
Wed, 10 Oct 2012 18:40:19 +0000 (19:40 +0100)
committerBob Liu <lliubbo@gmail.com>
Thu, 13 Dec 2012 05:50:57 +0000 (13:50 +0800)
This patch removes some code duplication by using
module_platform_driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
arch/blackfin/mach-common/dpmc.c

index f5685a496c58d648e387f4fb03c56efe9bf6cbcc..978bb400be062a350dbe1281ed8c658f0f86b476 100644 (file)
@@ -157,24 +157,7 @@ struct platform_driver bfin_dpmc_device_driver = {
                .name = DRIVER_NAME,
        }
 };
-
-/**
- *     bfin_dpmc_init - Init driver
- */
-static int __init bfin_dpmc_init(void)
-{
-       return platform_driver_register(&bfin_dpmc_device_driver);
-}
-module_init(bfin_dpmc_init);
-
-/**
- *     bfin_dpmc_exit - break down driver
- */
-static void __exit bfin_dpmc_exit(void)
-{
-       platform_driver_unregister(&bfin_dpmc_device_driver);
-}
-module_exit(bfin_dpmc_exit);
+module_platform_driver(bfin_dpmc_device_driver);
 
 MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
 MODULE_DESCRIPTION("cpu power management driver for Blackfin");
This page took 0.032075 seconds and 5 git commands to generate.