Skip to content

Commit f40fb63

Browse files
Jingoo Hangroeck
authored andcommitted
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>
1 parent 31880c3 commit f40fb63

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

drivers/hwmon/mc13783-adc.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -273,18 +273,7 @@ static struct platform_driver mc13783_adc_driver = {
273273
.id_table = mc13783_adc_idtable,
274274
};
275275

276-
static int __init mc13783_adc_init(void)
277-
{
278-
return platform_driver_probe(&mc13783_adc_driver, mc13783_adc_probe);
279-
}
280-
281-
static void __exit mc13783_adc_exit(void)
282-
{
283-
platform_driver_unregister(&mc13783_adc_driver);
284-
}
285-
286-
module_init(mc13783_adc_init);
287-
module_exit(mc13783_adc_exit);
276+
module_platform_driver_probe(mc13783_adc_driver, mc13783_adc_probe);
288277

289278
MODULE_DESCRIPTION("MC13783 ADC driver");
290279
MODULE_AUTHOR("Luotao Fu <l.fu@pengutronix.de>");

0 commit comments

Comments
 (0)