Skip to content

Commit

Permalink
hwmon: (mc13783-adc.c) use module_platform_driver_probe()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jingoo Han authored and Guenter Roeck committed Apr 8, 2013
1 parent 31880c3 commit f40fb63
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/hwmon/mc13783-adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>");
Expand Down

0 comments on commit f40fb63

Please sign in to comment.