From: Krzysztof Kozlowski Date: Tue, 5 May 2026 10:29:22 +0000 (+0200) Subject: hwmon: Move MODULE_DEVICE_TABLE next to the table itself X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe97565f8977be862073dc6a4faf578555108ed6;p=thirdparty%2Flinux.git 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 Acked-by: Thomas Weißschuh # cros_ec_hwmon.c Link: https://lore.kernel.org/r/20260505102923.189289-2-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c index 24f3e86d0ebf2..90a14a7f2c4c0 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c @@ -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); diff --git a/drivers/hwmon/cros_ec_hwmon.c b/drivers/hwmon/cros_ec_hwmon.c index 6cf5ab0f4b738..7c308b0a4b9e2 100644 --- a/drivers/hwmon/cros_ec_hwmon.c +++ b/drivers/hwmon/cros_ec_hwmon.c @@ -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 "); MODULE_AUTHOR("Adam Baker "); MODULE_DESCRIPTION("NSA320 Hardware Monitoring");