summaryrefslogtreecommitdiff
path: root/drivers/hwmon/mc13783-adc.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-03-05 07:12:55 +0400
committerGuenter Roeck <linux@roeck-us.net>2013-04-08 08:16:37 +0400
commitf40fb63e923ccc8c280f8451d4909bb8607a1a8f (patch)
treecd181ab5869e1aae9a632ae87e787cb7849471e3 /drivers/hwmon/mc13783-adc.c
parent31880c37c11e28cb81c70757e38392b42e695dc6 (diff)
downloadlinux-f40fb63e923ccc8c280f8451d4909bb8607a1a8f.tar.xz
hwmon: (mc13783-adc.c) use module_platform_driver_probe()
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>
Diffstat (limited to 'drivers/hwmon/mc13783-adc.c')
-rw-r--r--drivers/hwmon/mc13783-adc.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/hwmon/mc13783-adc.c b/drivers/hwmon/mc13783-adc.c
index 2a7f331cd3c0..982d8622c09b 100644
--- a/drivers/hwmon/mc13783-adc.c
+++ b/drivers/hwmon/mc13783-adc.c
@@ -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>");