forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Cc: Simon Guinot <[email protected]> Cc: Lars-Peter Clausen <[email protected]> Cc: MyungJoo Ham <[email protected]> Cc: Ben Dooks <[email protected]> Cc: Hans de Goede <[email protected]> Cc: J Keerthy <[email protected]> Cc: David S. Miller <[email protected]> Cc: Mark Brown <[email protected]> Signed-off-by: Axel Lin <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
- Loading branch information
Showing
11 changed files
with
11 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -506,17 +506,7 @@ static struct platform_driver exynos4_tmu_driver = { | |
.resume = exynos4_tmu_resume, | ||
}; | ||
|
||
static int __init exynos4_tmu_driver_init(void) | ||
{ | ||
return platform_driver_register(&exynos4_tmu_driver); | ||
} | ||
module_init(exynos4_tmu_driver_init); | ||
|
||
static void __exit exynos4_tmu_driver_exit(void) | ||
{ | ||
platform_driver_unregister(&exynos4_tmu_driver); | ||
} | ||
module_exit(exynos4_tmu_driver_exit); | ||
module_platform_driver(exynos4_tmu_driver); | ||
|
||
MODULE_DESCRIPTION("EXYNOS4 TMU Driver"); | ||
MODULE_AUTHOR("Donggeun Kim <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -539,18 +539,7 @@ static struct platform_driver gpio_fan_driver = { | |
}, | ||
}; | ||
|
||
static int __init gpio_fan_init(void) | ||
{ | ||
return platform_driver_register(&gpio_fan_driver); | ||
} | ||
|
||
static void __exit gpio_fan_exit(void) | ||
{ | ||
platform_driver_unregister(&gpio_fan_driver); | ||
} | ||
|
||
module_init(gpio_fan_init); | ||
module_exit(gpio_fan_exit); | ||
module_platform_driver(gpio_fan_driver); | ||
|
||
MODULE_AUTHOR("Simon Guinot <[email protected]>"); | ||
MODULE_DESCRIPTION("GPIO FAN driver"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -212,17 +212,7 @@ struct platform_driver jz4740_hwmon_driver = { | |
}, | ||
}; | ||
|
||
static int __init jz4740_hwmon_init(void) | ||
{ | ||
return platform_driver_register(&jz4740_hwmon_driver); | ||
} | ||
module_init(jz4740_hwmon_init); | ||
|
||
static void __exit jz4740_hwmon_exit(void) | ||
{ | ||
platform_driver_unregister(&jz4740_hwmon_driver); | ||
} | ||
module_exit(jz4740_hwmon_exit); | ||
module_platform_driver(jz4740_hwmon_driver); | ||
|
||
MODULE_DESCRIPTION("JZ4740 SoC HWMON driver"); | ||
MODULE_AUTHOR("Lars-Peter Clausen <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -432,19 +432,7 @@ static struct platform_driver ntc_thermistor_driver = { | |
.id_table = ntc_thermistor_id, | ||
}; | ||
|
||
static int __init ntc_thermistor_init(void) | ||
{ | ||
return platform_driver_register(&ntc_thermistor_driver); | ||
} | ||
|
||
module_init(ntc_thermistor_init); | ||
|
||
static void __exit ntc_thermistor_cleanup(void) | ||
{ | ||
platform_driver_unregister(&ntc_thermistor_driver); | ||
} | ||
|
||
module_exit(ntc_thermistor_cleanup); | ||
module_platform_driver(ntc_thermistor_driver); | ||
|
||
MODULE_DESCRIPTION("NTC Thermistor Driver"); | ||
MODULE_AUTHOR("MyungJoo Ham <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -393,18 +393,7 @@ static struct platform_driver s3c_hwmon_driver = { | |
.remove = __devexit_p(s3c_hwmon_remove), | ||
}; | ||
|
||
static int __init s3c_hwmon_init(void) | ||
{ | ||
return platform_driver_register(&s3c_hwmon_driver); | ||
} | ||
|
||
static void __exit s3c_hwmon_exit(void) | ||
{ | ||
platform_driver_unregister(&s3c_hwmon_driver); | ||
} | ||
|
||
module_init(s3c_hwmon_init); | ||
module_exit(s3c_hwmon_exit); | ||
module_platform_driver(s3c_hwmon_driver); | ||
|
||
MODULE_AUTHOR("Ben Dooks <[email protected]>"); | ||
MODULE_DESCRIPTION("S3C ADC HWMon driver"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -590,19 +590,8 @@ static struct platform_driver sch5627_driver = { | |
.remove = sch5627_remove, | ||
}; | ||
|
||
static int __init sch5627_init(void) | ||
{ | ||
return platform_driver_register(&sch5627_driver); | ||
} | ||
|
||
static void __exit sch5627_exit(void) | ||
{ | ||
platform_driver_unregister(&sch5627_driver); | ||
} | ||
module_platform_driver(sch5627_driver); | ||
|
||
MODULE_DESCRIPTION("SMSC SCH5627 Hardware Monitoring Driver"); | ||
MODULE_AUTHOR("Hans de Goede <[email protected]>"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(sch5627_init); | ||
module_exit(sch5627_exit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -521,19 +521,8 @@ static struct platform_driver sch5636_driver = { | |
.remove = sch5636_remove, | ||
}; | ||
|
||
static int __init sch5636_init(void) | ||
{ | ||
return platform_driver_register(&sch5636_driver); | ||
} | ||
|
||
static void __exit sch5636_exit(void) | ||
{ | ||
platform_driver_unregister(&sch5636_driver); | ||
} | ||
module_platform_driver(sch5636_driver); | ||
|
||
MODULE_DESCRIPTION("SMSC SCH5636 Hardware Monitoring Driver"); | ||
MODULE_AUTHOR("Hans de Goede <[email protected]>"); | ||
MODULE_LICENSE("GPL"); | ||
|
||
module_init(sch5636_init); | ||
module_exit(sch5636_exit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,17 +209,7 @@ static struct platform_driver wm831x_hwmon_driver = { | |
}, | ||
}; | ||
|
||
static int __init wm831x_hwmon_init(void) | ||
{ | ||
return platform_driver_register(&wm831x_hwmon_driver); | ||
} | ||
module_init(wm831x_hwmon_init); | ||
|
||
static void __exit wm831x_hwmon_exit(void) | ||
{ | ||
platform_driver_unregister(&wm831x_hwmon_driver); | ||
} | ||
module_exit(wm831x_hwmon_exit); | ||
module_platform_driver(wm831x_hwmon_driver); | ||
|
||
MODULE_AUTHOR("Mark Brown <[email protected]>"); | ||
MODULE_DESCRIPTION("WM831x Hardware Monitoring"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,17 +133,7 @@ static struct platform_driver wm8350_hwmon_driver = { | |
}, | ||
}; | ||
|
||
static int __init wm8350_hwmon_init(void) | ||
{ | ||
return platform_driver_register(&wm8350_hwmon_driver); | ||
} | ||
module_init(wm8350_hwmon_init); | ||
|
||
static void __exit wm8350_hwmon_exit(void) | ||
{ | ||
platform_driver_unregister(&wm8350_hwmon_driver); | ||
} | ||
module_exit(wm8350_hwmon_exit); | ||
module_platform_driver(wm8350_hwmon_driver); | ||
|
||
MODULE_AUTHOR("Mark Brown <[email protected]>"); | ||
MODULE_DESCRIPTION("WM8350 Hardware Monitoring"); | ||
|