public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] leds: Move MODULE_DEVICE_TABLE next to the table itself
@ 2026-05-05 10:28 Krzysztof Kozlowski
  2026-05-05 15:34 ` Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-05-05 10:28 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, William Zhang, Anand Gore, Kursad Oney,
	Florian Fainelli, Rafał Miłecki,
	Broadcom internal kernel review list, Thomas Weißschuh,
	Benson Leung, Guenter Roeck, linux-leds, linux-arm-kernel,
	linux-kernel, chrome-platform
  Cc: Krzysztof Kozlowski

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/leds/blink/leds-bcm63138.c | 2 +-
 drivers/leds/leds-cros_ec.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/blink/leds-bcm63138.c b/drivers/leds/blink/leds-bcm63138.c
index ef2e511438cc..45c0662df933 100644
--- a/drivers/leds/blink/leds-bcm63138.c
+++ b/drivers/leds/blink/leds-bcm63138.c
@@ -296,6 +296,7 @@ static const struct of_device_id bcm63138_leds_of_match_table[] = {
 	{ .compatible = "brcm,bcm63138-leds", },
 	{ },
 };
+MODULE_DEVICE_TABLE(of, bcm63138_leds_of_match_table);
 
 static struct platform_driver bcm63138_leds_driver = {
 	.probe = bcm63138_leds_probe,
@@ -310,4 +311,3 @@ module_platform_driver(bcm63138_leds_driver);
 MODULE_AUTHOR("Rafał Miłecki");
 MODULE_DESCRIPTION("Broadcom BCM63138 SoC LED driver");
 MODULE_LICENSE("GPL");
-MODULE_DEVICE_TABLE(of, bcm63138_leds_of_match_table);
diff --git a/drivers/leds/leds-cros_ec.c b/drivers/leds/leds-cros_ec.c
index bea3cc3fbfd2..6592ceee866a 100644
--- a/drivers/leds/leds-cros_ec.c
+++ b/drivers/leds/leds-cros_ec.c
@@ -249,6 +249,7 @@ static const struct platform_device_id cros_ec_led_id[] = {
 	{ "cros-ec-led", 0 },
 	{}
 };
+MODULE_DEVICE_TABLE(platform, cros_ec_led_id);
 
 static struct platform_driver cros_ec_led_driver = {
 	.driver.name	= "cros-ec-led",
@@ -257,7 +258,6 @@ static struct platform_driver cros_ec_led_driver = {
 };
 module_platform_driver(cros_ec_led_driver);
 
-MODULE_DEVICE_TABLE(platform, cros_ec_led_id);
 MODULE_DESCRIPTION("ChromeOS EC LED Driver");
 MODULE_AUTHOR("Thomas Weißschuh <linux@weissschuh.net");
 MODULE_LICENSE("GPL");
-- 
2.51.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] leds: Move MODULE_DEVICE_TABLE next to the table itself
  2026-05-05 10:28 [PATCH] leds: Move MODULE_DEVICE_TABLE next to the table itself Krzysztof Kozlowski
@ 2026-05-05 15:34 ` Florian Fainelli
  2026-05-06  2:49 ` Tzung-Bi Shih
  2026-05-06  6:19 ` Thomas Weißschuh
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2026-05-05 15:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Lee Jones, Pavel Machek, William Zhang,
	Anand Gore, Kursad Oney, Rafał Miłecki,
	Broadcom internal kernel review list, Thomas Weißschuh,
	Benson Leung, Guenter Roeck, linux-leds, linux-arm-kernel,
	linux-kernel, chrome-platform

On 5/5/26 03:28, 'Krzysztof Kozlowski' via BCM-KERNEL-FEEDBACK-LIST,PDL 
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>
> ---
>   drivers/leds/blink/leds-bcm63138.c | 2 +-

For the above:

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] leds: Move MODULE_DEVICE_TABLE next to the table itself
  2026-05-05 10:28 [PATCH] leds: Move MODULE_DEVICE_TABLE next to the table itself Krzysztof Kozlowski
  2026-05-05 15:34 ` Florian Fainelli
@ 2026-05-06  2:49 ` Tzung-Bi Shih
  2026-05-06  6:19 ` Thomas Weißschuh
  2 siblings, 0 replies; 4+ messages in thread
From: Tzung-Bi Shih @ 2026-05-06  2:49 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Lee Jones, Pavel Machek, William Zhang, Anand Gore, Kursad Oney,
	Florian Fainelli, Rafał Miłecki,
	Broadcom internal kernel review list, Thomas Weißschuh,
	Benson Leung, Guenter Roeck, linux-leds, linux-arm-kernel,
	linux-kernel, chrome-platform

On Tue, May 05, 2026 at 12:28:45PM +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>
> ---
>  drivers/leds/blink/leds-bcm63138.c | 2 +-
>  drivers/leds/leds-cros_ec.c        | 2 +-

For leds-cros_ec.c,
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] leds: Move MODULE_DEVICE_TABLE next to the table itself
  2026-05-05 10:28 [PATCH] leds: Move MODULE_DEVICE_TABLE next to the table itself Krzysztof Kozlowski
  2026-05-05 15:34 ` Florian Fainelli
  2026-05-06  2:49 ` Tzung-Bi Shih
@ 2026-05-06  6:19 ` Thomas Weißschuh
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Weißschuh @ 2026-05-06  6:19 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Lee Jones, Pavel Machek, William Zhang, Anand Gore, Kursad Oney,
	Florian Fainelli, Rafał Miłecki,
	Broadcom internal kernel review list, Benson Leung, Guenter Roeck,
	linux-leds, linux-arm-kernel, linux-kernel, chrome-platform

On 2026-05-05 12:28:45+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> # leds-cros_ec.c

> ---
>  drivers/leds/blink/leds-bcm63138.c | 2 +-
>  drivers/leds/leds-cros_ec.c        | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

(...)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-06  6:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05 10:28 [PATCH] leds: Move MODULE_DEVICE_TABLE next to the table itself Krzysztof Kozlowski
2026-05-05 15:34 ` Florian Fainelli
2026-05-06  2:49 ` Tzung-Bi Shih
2026-05-06  6:19 ` Thomas Weißschuh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox