From: Srinivas Kandagatla Date: Wed, 10 Oct 2012 18:40:19 +0000 (+0100) Subject: Blackfin: dpmc: use module_platform_driver macro X-Git-Tag: firefly_0821_release~3680^2~1405^2~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4452fec6af8d5ed1dc3ac37f31d7da1bd62733b8;p=firefly-linux-kernel-4.4.55.git Blackfin: dpmc: use module_platform_driver macro This patch removes some code duplication by using module_platform_driver. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mike Frysinger Signed-off-by: Bob Liu --- diff --git a/arch/blackfin/mach-common/dpmc.c b/arch/blackfin/mach-common/dpmc.c index f5685a496c58..978bb400be06 100644 --- a/arch/blackfin/mach-common/dpmc.c +++ b/arch/blackfin/mach-common/dpmc.c @@ -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 "); MODULE_DESCRIPTION("cpu power management driver for Blackfin");