aboutsummaryrefslogtreecommitdiffstats
path: root/arch/unicore32/kernel
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2012-08-30 07:43:14 -0400
committerThierry Reding <thierry.reding@avionic-design.de>2012-10-05 14:56:40 -0400
commitdde9959b8d5b791a3e06e3c44f2d9ba0ec5143f0 (patch)
treef5b008c23cf365ce10a323090b5b73a09803e4b1 /arch/unicore32/kernel
parentd1b6886502160eb771aefe21c1f891597138ddfe (diff)
unicore32: pwm: Use module_platform_driver()
Some of the boilerplate code can be eliminated by using this macro. The driver was previously registered with an arch_initcall(), so technically this is no longer the same, but when the driver is moved to the PWM framework, deferred probing will take care of any driver probe ordering issues. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Qin Rui <qinrui@mprc.pku.edu.cn> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Diffstat (limited to 'arch/unicore32/kernel')
-rw-r--r--arch/unicore32/kernel/pwm.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/arch/unicore32/kernel/pwm.c b/arch/unicore32/kernel/pwm.c
index 885bbcdc253d..012c54a8019a 100644
--- a/arch/unicore32/kernel/pwm.c
+++ b/arch/unicore32/kernel/pwm.c
@@ -254,25 +254,6 @@ static struct platform_driver puv3_pwm_driver = {
254 .probe = puv3_pwm_probe, 254 .probe = puv3_pwm_probe,
255 .remove = __devexit_p(pwm_remove), 255 .remove = __devexit_p(pwm_remove),
256}; 256};
257 257module_platform_driver(puv3_pwm_driver);
258static int __init pwm_init(void)
259{
260 int ret = 0;
261
262 ret = platform_driver_register(&puv3_pwm_driver);
263 if (ret) {
264 printk(KERN_ERR "failed to register puv3_pwm_driver\n");
265 return ret;
266 }
267
268 return ret;
269}
270arch_initcall(pwm_init);
271
272static void __exit pwm_exit(void)
273{
274 platform_driver_unregister(&puv3_pwm_driver);
275}
276module_exit(pwm_exit);
277 258
278MODULE_LICENSE("GPL v2"); 259MODULE_LICENSE("GPL v2");