hwmon: Move MODULE_DEVICE_TABLE next to the table itself
By convention MODULE_DEVICE_TABLE() immediately follows the ID table it exports, because this is easier to read and verify. It also makes more sense since #ifdef for ACPI or OF could hide both of them. Most of the privers already have this correctly placed, so adjust the missing ones. No functional impact. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Acked-by: Thomas Weißschuh <linux@weissschuh.net> # cros_ec_hwmon.c Link: https://lore.kernel.org/r/20260505102923.189289-2-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
1 parent
b46e1a0bff
commit
fe97565f89
4 files changed
+4
-4
No files matched your search
@@ -1305,6 +1305,7 @@ static const struct dmi_system_id applesmc_whitelist[] __initconst = {
|
||||
},
|
||||
{ .ident = NULL }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(dmi, applesmc_whitelist);
|
||||
|
||||
static int __init applesmc_init(void)
|
||||
{
|
||||
@@ -1416,4 +1417,3 @@ module_exit(applesmc_exit);
|
||||
MODULE_AUTHOR("Nicolas Boichat");
|
||||
MODULE_DESCRIPTION("Apple SMC");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_DEVICE_TABLE(dmi, applesmc_whitelist);
|
||||
@@ -657,6 +657,7 @@ static const struct platform_device_id cros_ec_hwmon_id[] = {
|
||||
{ DRV_NAME, 0 },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, cros_ec_hwmon_id);
|
||||
|
||||
static struct platform_driver cros_ec_hwmon_driver = {
|
||||
.driver.name = DRV_NAME,
|
||||
@@ -667,7 +668,6 @@ static struct platform_driver cros_ec_hwmon_driver = {
|
||||
};
|
||||
module_platform_driver(cros_ec_hwmon_driver);
|
||||
|
||||
MODULE_DEVICE_TABLE(platform, cros_ec_hwmon_id);
|
||||
MODULE_DESCRIPTION("ChromeOS EC Hardware Monitoring Driver");
|
||||
MODULE_AUTHOR("Thomas Weißschuh <linux@weissschuh.net");
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -773,6 +773,7 @@ static const struct platform_device_id intel_m10bmc_hwmon_ids[] = {
|
||||
},
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, intel_m10bmc_hwmon_ids);
|
||||
|
||||
static struct platform_driver intel_m10bmc_hwmon_driver = {
|
||||
.probe = m10bmc_hwmon_probe,
|
||||
@@ -783,7 +784,6 @@ static struct platform_driver intel_m10bmc_hwmon_driver = {
|
||||
};
|
||||
module_platform_driver(intel_m10bmc_hwmon_driver);
|
||||
|
||||
MODULE_DEVICE_TABLE(platform, intel_m10bmc_hwmon_ids);
|
||||
MODULE_AUTHOR("Intel Corporation");
|
||||
MODULE_DESCRIPTION("Intel MAX 10 BMC hardware monitor");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
@@ -153,6 +153,7 @@ static const struct of_device_id of_nsa320_hwmon_match[] = {
|
||||
{ .compatible = "zyxel,nsa320-mcu", },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, of_nsa320_hwmon_match);
|
||||
|
||||
static int nsa320_hwmon_probe(struct platform_device *pdev)
|
||||
{
|
||||
@@ -197,7 +198,6 @@ static struct platform_driver nsa320_hwmon_driver = {
|
||||
|
||||
module_platform_driver(nsa320_hwmon_driver);
|
||||
|
||||
MODULE_DEVICE_TABLE(of, of_nsa320_hwmon_match);
|
||||
MODULE_AUTHOR("Peter Schildmann <linux@schildmann.info>");
|
||||
MODULE_AUTHOR("Adam Baker <linux@baker-net.org.uk>");
|
||||
MODULE_DESCRIPTION("NSA320 Hardware Monitoring");
|
||||
|
||||
Reference in new issue
Block a user