Commit dde9959b authored by Thierry Reding's avatar Thierry Reding

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: default avatarThierry Reding <thierry.reding@avionic-design.de>
Tested-by: default avatarQin Rui <qinrui@mprc.pku.edu.cn>
Acked-by: default avatarGuan Xuetao <gxt@mprc.pku.edu.cn>
parent d1b68865
...@@ -254,25 +254,6 @@ static struct platform_driver puv3_pwm_driver = { ...@@ -254,25 +254,6 @@ static struct platform_driver puv3_pwm_driver = {
.probe = puv3_pwm_probe, .probe = puv3_pwm_probe,
.remove = __devexit_p(pwm_remove), .remove = __devexit_p(pwm_remove),
}; };
module_platform_driver(puv3_pwm_driver);
static int __init pwm_init(void)
{
int ret = 0;
ret = platform_driver_register(&puv3_pwm_driver);
if (ret) {
printk(KERN_ERR "failed to register puv3_pwm_driver\n");
return ret;
}
return ret;
}
arch_initcall(pwm_init);
static void __exit pwm_exit(void)
{
platform_driver_unregister(&puv3_pwm_driver);
}
module_exit(pwm_exit);
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment