mfd: ab3100-otp: use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Tue, 5 Mar 2013 04:47:06 +0000 (13:47 +0900)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 5 Apr 2013 16:08:31 +0000 (18:08 +0200)
This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/ab3100-otp.c

index 8440010eb2b87b64f261d3dc87db955bebc737ea..d7ce016029faeff74ea4735997efa813b12abf99 100644 (file)
@@ -248,19 +248,7 @@ static struct platform_driver ab3100_otp_driver = {
        .remove  = __exit_p(ab3100_otp_remove),
 };
 
-static int __init ab3100_otp_init(void)
-{
-       return platform_driver_probe(&ab3100_otp_driver,
-                                    ab3100_otp_probe);
-}
-
-static void __exit ab3100_otp_exit(void)
-{
-       platform_driver_unregister(&ab3100_otp_driver);
-}
-
-module_init(ab3100_otp_init);
-module_exit(ab3100_otp_exit);
+module_platform_driver_probe(ab3100_otp_driver, ab3100_otp_probe);
 
 MODULE_AUTHOR("Linus Walleij <linus.walleij@stericsson.com>");
 MODULE_DESCRIPTION("AB3100 OTP Readout Driver");