hwmon: (mc13783-adc.c) use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Tue, 5 Mar 2013 03:12:55 +0000 (12:12 +0900)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 8 Apr 2013 04:16:37 +0000 (21:16 -0700)
This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/mc13783-adc.c

index 2a7f331cd3c012a48652fffed43c458482ec2f89..982d8622c09b375f080bc2c81bfbacb71cf0896c 100644 (file)
@@ -273,18 +273,7 @@ static struct platform_driver mc13783_adc_driver = {
        .id_table       = mc13783_adc_idtable,
 };
 
-static int __init mc13783_adc_init(void)
-{
-       return platform_driver_probe(&mc13783_adc_driver, mc13783_adc_probe);
-}
-
-static void __exit mc13783_adc_exit(void)
-{
-       platform_driver_unregister(&mc13783_adc_driver);
-}
-
-module_init(mc13783_adc_init);
-module_exit(mc13783_adc_exit);
+module_platform_driver_probe(mc13783_adc_driver, mc13783_adc_probe);
 
 MODULE_DESCRIPTION("MC13783 ADC driver");
 MODULE_AUTHOR("Luotao Fu <l.fu@pengutronix.de>");