Skip to contentSkip to conversation

hwmon: mc13783-adc: Use module_platform_driver_probe macro

PATCH In review Sachin Kamat 2 participants 3 messages Mar 5, 2013 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: mc13783-adc: Use module_platform_driver_probe macro

module_platform_driver_probe() eliminates the boilerplate and simplifies the code.

---
 drivers/hwmon/mc13783-adc.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/hwmon/mc13783-adc.c +1 -12
index 2a7f331..982d862 100644
@@ -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 <[email protected]>");
Signature · 7 lines
1.7.4.1


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw
In reply to Sachin Kamat
Quoted 10 lines · Guenter Roeck
Quoted 4 lines · Sachin Kamat

module_platform_driver_probe() eliminates the boilerplate and simplifies the code.

Hi Sachin,

The same patch was already submitted a couple of hours earlier.... so I applied that one.

Oh OK. No problem.

Signature · 7 lines
With warm regards,
Sachin

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors