drivers/power/supply/cros_charge-control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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>
---
drivers/power/supply/cros_charge-control.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/cros_charge-control.c b/drivers/power/supply/cros_charge-control.c
index 53e6a77e03fc..6a5e54218178 100644
--- a/drivers/power/supply/cros_charge-control.c
+++ b/drivers/power/supply/cros_charge-control.c
@@ -323,6 +323,7 @@ static const struct platform_device_id cros_chctl_id[] = {
{ "cros-charge-control", 0 },
{}
};
+MODULE_DEVICE_TABLE(platform, cros_chctl_id);
static struct platform_driver cros_chctl_driver = {
.driver.name = "cros-charge-control",
@@ -331,7 +332,6 @@ static struct platform_driver cros_chctl_driver = {
};
module_platform_driver(cros_chctl_driver);
-MODULE_DEVICE_TABLE(platform, cros_chctl_id);
MODULE_DESCRIPTION("ChromeOS EC charge control");
MODULE_AUTHOR("Thomas Weißschuh <linux@weissschuh.net>");
MODULE_LICENSE("GPL");
--
2.51.0
On 2026-05-05 12:27:52+0200, Krzysztof Kozlowski wrote: > 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> (...)
On Tue, May 05, 2026 at 12:27:52PM +0200, Krzysztof Kozlowski wrote:
> 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
^ d
> the missing ones. No functional impact.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
© 2016 - 2026 Red Hat, Inc.