pwm: i.MX: Use module_platform_driver
authorSascha Hauer <s.hauer@pengutronix.de>
Tue, 28 Aug 2012 06:27:40 +0000 (08:27 +0200)
committerThierry Reding <thierry.reding@avionic-design.de>
Wed, 12 Sep 2012 12:25:05 +0000 (14:25 +0200)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
drivers/pwm/pwm-imx.c

index 13d4d22..a1e799e 100644 (file)
@@ -271,17 +271,7 @@ static struct platform_driver imx_pwm_driver = {
        .remove         = __devexit_p(imx_pwm_remove),
 };
 
-static int __init imx_pwm_init(void)
-{
-       return platform_driver_register(&imx_pwm_driver);
-}
-arch_initcall(imx_pwm_init);
-
-static void __exit imx_pwm_exit(void)
-{
-       platform_driver_unregister(&imx_pwm_driver);
-}
-module_exit(imx_pwm_exit);
+module_platform_driver(imx_pwm_driver);
 
 MODULE_LICENSE("GPL v2");
 MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");