diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-25 02:31:00 -0500 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2011-11-26 12:48:20 -0500 |
commit | 25a236a5dba47a16affb105525cfd75eaa03ceea (patch) | |
tree | 44047e6d3e12a4dc0e4bde8d5ccb30da01101cd5 /drivers/hwmon | |
parent | b52fabca369f433999837b73031bdd34feb6fca2 (diff) |
hwmon: convert drivers/hwmon/* to use module_platform_driver()
This patch converts the drivers in drivers/hwmon/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.
Cc: Donggeun Kim <dg77.kim@samsung.com>
Cc: Simon Guinot <sguinot@lacie.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Ben Dooks <ben@simtec.co.uk>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: J Keerthy <j-keerthy@ti.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/exynos4_tmu.c | 12 | ||||
-rw-r--r-- | drivers/hwmon/gpio-fan.c | 13 | ||||
-rw-r--r-- | drivers/hwmon/jz4740-hwmon.c | 12 | ||||
-rw-r--r-- | drivers/hwmon/ntc_thermistor.c | 14 | ||||
-rw-r--r-- | drivers/hwmon/s3c-hwmon.c | 13 | ||||
-rw-r--r-- | drivers/hwmon/sch5627.c | 13 | ||||
-rw-r--r-- | drivers/hwmon/sch5636.c | 13 | ||||
-rw-r--r-- | drivers/hwmon/twl4030-madc-hwmon.c | 14 | ||||
-rw-r--r-- | drivers/hwmon/ultra45_env.c | 13 | ||||
-rw-r--r-- | drivers/hwmon/wm831x-hwmon.c | 12 | ||||
-rw-r--r-- | drivers/hwmon/wm8350-hwmon.c | 12 |
11 files changed, 11 insertions, 130 deletions
diff --git a/drivers/hwmon/exynos4_tmu.c b/drivers/hwmon/exynos4_tmu.c index faa0884f61f6..f2359a0093bd 100644 --- a/drivers/hwmon/exynos4_tmu.c +++ b/drivers/hwmon/exynos4_tmu.c | |||
@@ -506,17 +506,7 @@ static struct platform_driver exynos4_tmu_driver = { | |||
506 | .resume = exynos4_tmu_resume, | 506 | .resume = exynos4_tmu_resume, |
507 | }; | 507 | }; |
508 | 508 | ||
509 | static int __init exynos4_tmu_driver_init(void) | 509 | module_platform_driver(exynos4_tmu_driver); |
510 | { | ||
511 | return platform_driver_register(&exynos4_tmu_driver); | ||
512 | } | ||
513 | module_init(exynos4_tmu_driver_init); | ||
514 | |||
515 | static void __exit exynos4_tmu_driver_exit(void) | ||
516 | { | ||
517 | platform_driver_unregister(&exynos4_tmu_driver); | ||
518 | } | ||
519 | module_exit(exynos4_tmu_driver_exit); | ||
520 | 510 | ||
521 | MODULE_DESCRIPTION("EXYNOS4 TMU Driver"); | 511 | MODULE_DESCRIPTION("EXYNOS4 TMU Driver"); |
522 | MODULE_AUTHOR("Donggeun Kim <dg77.kim@samsung.com>"); | 512 | MODULE_AUTHOR("Donggeun Kim <dg77.kim@samsung.com>"); |
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c index 89aa9fb743af..9ba38f318ffb 100644 --- a/drivers/hwmon/gpio-fan.c +++ b/drivers/hwmon/gpio-fan.c | |||
@@ -539,18 +539,7 @@ static struct platform_driver gpio_fan_driver = { | |||
539 | }, | 539 | }, |
540 | }; | 540 | }; |
541 | 541 | ||
542 | static int __init gpio_fan_init(void) | 542 | module_platform_driver(gpio_fan_driver); |
543 | { | ||
544 | return platform_driver_register(&gpio_fan_driver); | ||
545 | } | ||
546 | |||
547 | static void __exit gpio_fan_exit(void) | ||
548 | { | ||
549 | platform_driver_unregister(&gpio_fan_driver); | ||
550 | } | ||
551 | |||
552 | module_init(gpio_fan_init); | ||
553 | module_exit(gpio_fan_exit); | ||
554 | 543 | ||
555 | MODULE_AUTHOR("Simon Guinot <sguinot@lacie.com>"); | 544 | MODULE_AUTHOR("Simon Guinot <sguinot@lacie.com>"); |
556 | MODULE_DESCRIPTION("GPIO FAN driver"); | 545 | MODULE_DESCRIPTION("GPIO FAN driver"); |
diff --git a/drivers/hwmon/jz4740-hwmon.c b/drivers/hwmon/jz4740-hwmon.c index fea292d43407..7a48b1eb4233 100644 --- a/drivers/hwmon/jz4740-hwmon.c +++ b/drivers/hwmon/jz4740-hwmon.c | |||
@@ -212,17 +212,7 @@ struct platform_driver jz4740_hwmon_driver = { | |||
212 | }, | 212 | }, |
213 | }; | 213 | }; |
214 | 214 | ||
215 | static int __init jz4740_hwmon_init(void) | 215 | module_platform_driver(jz4740_hwmon_driver); |
216 | { | ||
217 | return platform_driver_register(&jz4740_hwmon_driver); | ||
218 | } | ||
219 | module_init(jz4740_hwmon_init); | ||
220 | |||
221 | static void __exit jz4740_hwmon_exit(void) | ||
222 | { | ||
223 | platform_driver_unregister(&jz4740_hwmon_driver); | ||
224 | } | ||
225 | module_exit(jz4740_hwmon_exit); | ||
226 | 216 | ||
227 | MODULE_DESCRIPTION("JZ4740 SoC HWMON driver"); | 217 | MODULE_DESCRIPTION("JZ4740 SoC HWMON driver"); |
228 | MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); | 218 | MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); |
diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c index eab11615dced..9b382ec2c3bd 100644 --- a/drivers/hwmon/ntc_thermistor.c +++ b/drivers/hwmon/ntc_thermistor.c | |||
@@ -432,19 +432,7 @@ static struct platform_driver ntc_thermistor_driver = { | |||
432 | .id_table = ntc_thermistor_id, | 432 | .id_table = ntc_thermistor_id, |
433 | }; | 433 | }; |
434 | 434 | ||
435 | static int __init ntc_thermistor_init(void) | 435 | module_platform_driver(ntc_thermistor_driver); |
436 | { | ||
437 | return platform_driver_register(&ntc_thermistor_driver); | ||
438 | } | ||
439 | |||
440 | module_init(ntc_thermistor_init); | ||
441 | |||
442 | static void __exit ntc_thermistor_cleanup(void) | ||
443 | { | ||
444 | platform_driver_unregister(&ntc_thermistor_driver); | ||
445 | } | ||
446 | |||
447 | module_exit(ntc_thermistor_cleanup); | ||
448 | 436 | ||
449 | MODULE_DESCRIPTION("NTC Thermistor Driver"); | 437 | MODULE_DESCRIPTION("NTC Thermistor Driver"); |
450 | MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>"); | 438 | MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>"); |
diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c index b39f52e2752a..f6c26d19f521 100644 --- a/drivers/hwmon/s3c-hwmon.c +++ b/drivers/hwmon/s3c-hwmon.c | |||
@@ -393,18 +393,7 @@ static struct platform_driver s3c_hwmon_driver = { | |||
393 | .remove = __devexit_p(s3c_hwmon_remove), | 393 | .remove = __devexit_p(s3c_hwmon_remove), |
394 | }; | 394 | }; |
395 | 395 | ||
396 | static int __init s3c_hwmon_init(void) | 396 | module_platform_driver(s3c_hwmon_driver); |
397 | { | ||
398 | return platform_driver_register(&s3c_hwmon_driver); | ||
399 | } | ||
400 | |||
401 | static void __exit s3c_hwmon_exit(void) | ||
402 | { | ||
403 | platform_driver_unregister(&s3c_hwmon_driver); | ||
404 | } | ||
405 | |||
406 | module_init(s3c_hwmon_init); | ||
407 | module_exit(s3c_hwmon_exit); | ||
408 | 397 | ||
409 | MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); | 398 | MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); |
410 | MODULE_DESCRIPTION("S3C ADC HWMon driver"); | 399 | MODULE_DESCRIPTION("S3C ADC HWMon driver"); |
diff --git a/drivers/hwmon/sch5627.c b/drivers/hwmon/sch5627.c index e3b5c6039c25..79b6dabe3161 100644 --- a/drivers/hwmon/sch5627.c +++ b/drivers/hwmon/sch5627.c | |||
@@ -590,19 +590,8 @@ static struct platform_driver sch5627_driver = { | |||
590 | .remove = sch5627_remove, | 590 | .remove = sch5627_remove, |
591 | }; | 591 | }; |
592 | 592 | ||
593 | static int __init sch5627_init(void) | 593 | module_platform_driver(sch5627_driver); |
594 | { | ||
595 | return platform_driver_register(&sch5627_driver); | ||
596 | } | ||
597 | |||
598 | static void __exit sch5627_exit(void) | ||
599 | { | ||
600 | platform_driver_unregister(&sch5627_driver); | ||
601 | } | ||
602 | 594 | ||
603 | MODULE_DESCRIPTION("SMSC SCH5627 Hardware Monitoring Driver"); | 595 | MODULE_DESCRIPTION("SMSC SCH5627 Hardware Monitoring Driver"); |
604 | MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>"); | 596 | MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>"); |
605 | MODULE_LICENSE("GPL"); | 597 | MODULE_LICENSE("GPL"); |
606 | |||
607 | module_init(sch5627_init); | ||
608 | module_exit(sch5627_exit); | ||
diff --git a/drivers/hwmon/sch5636.c b/drivers/hwmon/sch5636.c index 244407aa79fc..9d5236fb09b4 100644 --- a/drivers/hwmon/sch5636.c +++ b/drivers/hwmon/sch5636.c | |||
@@ -521,19 +521,8 @@ static struct platform_driver sch5636_driver = { | |||
521 | .remove = sch5636_remove, | 521 | .remove = sch5636_remove, |
522 | }; | 522 | }; |
523 | 523 | ||
524 | static int __init sch5636_init(void) | 524 | module_platform_driver(sch5636_driver); |
525 | { | ||
526 | return platform_driver_register(&sch5636_driver); | ||
527 | } | ||
528 | |||
529 | static void __exit sch5636_exit(void) | ||
530 | { | ||
531 | platform_driver_unregister(&sch5636_driver); | ||
532 | } | ||
533 | 525 | ||
534 | MODULE_DESCRIPTION("SMSC SCH5636 Hardware Monitoring Driver"); | 526 | MODULE_DESCRIPTION("SMSC SCH5636 Hardware Monitoring Driver"); |
535 | MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>"); | 527 | MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>"); |
536 | MODULE_LICENSE("GPL"); | 528 | MODULE_LICENSE("GPL"); |
537 | |||
538 | module_init(sch5636_init); | ||
539 | module_exit(sch5636_exit); | ||
diff --git a/drivers/hwmon/twl4030-madc-hwmon.c b/drivers/hwmon/twl4030-madc-hwmon.c index 57240740b161..0018c7dd0097 100644 --- a/drivers/hwmon/twl4030-madc-hwmon.c +++ b/drivers/hwmon/twl4030-madc-hwmon.c | |||
@@ -136,19 +136,7 @@ static struct platform_driver twl4030_madc_hwmon_driver = { | |||
136 | }, | 136 | }, |
137 | }; | 137 | }; |
138 | 138 | ||
139 | static int __init twl4030_madc_hwmon_init(void) | 139 | module_platform_driver(twl4030_madc_hwmon_driver); |
140 | { | ||
141 | return platform_driver_register(&twl4030_madc_hwmon_driver); | ||
142 | } | ||
143 | |||
144 | module_init(twl4030_madc_hwmon_init); | ||
145 | |||
146 | static void __exit twl4030_madc_hwmon_exit(void) | ||
147 | { | ||
148 | platform_driver_unregister(&twl4030_madc_hwmon_driver); | ||
149 | } | ||
150 | |||
151 | module_exit(twl4030_madc_hwmon_exit); | ||
152 | 140 | ||
153 | MODULE_DESCRIPTION("TWL4030 ADC Hwmon driver"); | 141 | MODULE_DESCRIPTION("TWL4030 ADC Hwmon driver"); |
154 | MODULE_LICENSE("GPL"); | 142 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/hwmon/ultra45_env.c b/drivers/hwmon/ultra45_env.c index 3cd07bf42dca..b9a87e89bab4 100644 --- a/drivers/hwmon/ultra45_env.c +++ b/drivers/hwmon/ultra45_env.c | |||
@@ -309,15 +309,4 @@ static struct platform_driver env_driver = { | |||
309 | .remove = __devexit_p(env_remove), | 309 | .remove = __devexit_p(env_remove), |
310 | }; | 310 | }; |
311 | 311 | ||
312 | static int __init env_init(void) | 312 | module_platform_driver(env_driver); |
313 | { | ||
314 | return platform_driver_register(&env_driver); | ||
315 | } | ||
316 | |||
317 | static void __exit env_exit(void) | ||
318 | { | ||
319 | platform_driver_unregister(&env_driver); | ||
320 | } | ||
321 | |||
322 | module_init(env_init); | ||
323 | module_exit(env_exit); | ||
diff --git a/drivers/hwmon/wm831x-hwmon.c b/drivers/hwmon/wm831x-hwmon.c index 97b1f834a471..9b598ed26020 100644 --- a/drivers/hwmon/wm831x-hwmon.c +++ b/drivers/hwmon/wm831x-hwmon.c | |||
@@ -209,17 +209,7 @@ static struct platform_driver wm831x_hwmon_driver = { | |||
209 | }, | 209 | }, |
210 | }; | 210 | }; |
211 | 211 | ||
212 | static int __init wm831x_hwmon_init(void) | 212 | module_platform_driver(wm831x_hwmon_driver); |
213 | { | ||
214 | return platform_driver_register(&wm831x_hwmon_driver); | ||
215 | } | ||
216 | module_init(wm831x_hwmon_init); | ||
217 | |||
218 | static void __exit wm831x_hwmon_exit(void) | ||
219 | { | ||
220 | platform_driver_unregister(&wm831x_hwmon_driver); | ||
221 | } | ||
222 | module_exit(wm831x_hwmon_exit); | ||
223 | 213 | ||
224 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); | 214 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); |
225 | MODULE_DESCRIPTION("WM831x Hardware Monitoring"); | 215 | MODULE_DESCRIPTION("WM831x Hardware Monitoring"); |
diff --git a/drivers/hwmon/wm8350-hwmon.c b/drivers/hwmon/wm8350-hwmon.c index 13290595ca86..3ff67edbdc44 100644 --- a/drivers/hwmon/wm8350-hwmon.c +++ b/drivers/hwmon/wm8350-hwmon.c | |||
@@ -133,17 +133,7 @@ static struct platform_driver wm8350_hwmon_driver = { | |||
133 | }, | 133 | }, |
134 | }; | 134 | }; |
135 | 135 | ||
136 | static int __init wm8350_hwmon_init(void) | 136 | module_platform_driver(wm8350_hwmon_driver); |
137 | { | ||
138 | return platform_driver_register(&wm8350_hwmon_driver); | ||
139 | } | ||
140 | module_init(wm8350_hwmon_init); | ||
141 | |||
142 | static void __exit wm8350_hwmon_exit(void) | ||
143 | { | ||
144 | platform_driver_unregister(&wm8350_hwmon_driver); | ||
145 | } | ||
146 | module_exit(wm8350_hwmon_exit); | ||
147 | 137 | ||
148 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); | 138 | MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); |
149 | MODULE_DESCRIPTION("WM8350 Hardware Monitoring"); | 139 | MODULE_DESCRIPTION("WM8350 Hardware Monitoring"); |