mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] leds: s2m: wire up missing of_match_table in platform drivers
@ 2026-07-21  5:48 kr494167
  2026-07-21  5:48 ` [PATCH 1/2] leds: rgb: s2m: wire up of_match_table in platform driver kr494167
  2026-07-21  5:48 ` [PATCH 2/2] leds: flash: " kr494167
  0 siblings, 2 replies; 3+ messages in thread
From: kr494167 @ 2026-07-21  5:48 UTC (permalink / raw)
  To: lee, pavel; +Cc: kauschluss, linux-leds, linux-kernel, surendra

From: surendra <kr494167@gmail.com>

Both the S2M RGB and flash LED platform drivers define an OF match table
and register it with MODULE_DEVICE_TABLE(of, ...) to generate modalias
entries for DT-based module auto-loading, but forget to assign the table
to the platform_driver's .driver.of_match_table field.

The consequence is two-fold:
 - The kernel will never match and probe the driver when a DT node with
   the corresponding compatible string is present.
 - The MODULE_DEVICE_TABLE(of, ...) entries become dead code - uevent
   modalias strings are generated but the driver can never be loaded by
   them.

Both patches wire the existing tables up into the platform_driver struct,
fixing DT-based probing and module auto-loading without any functional
change to the non-DT (platform ID) probing path.

surendra (2):
  leds: rgb: s2m: wire up of_match_table in platform driver
  leds: flash: s2m: wire up of_match_table in platform driver

 drivers/leds/flash/leds-s2m-flash.c | 1 +
 drivers/leds/rgb/leds-s2m-rgb.c     | 1 +
 2 files changed, 2 insertions(+)

-- 
2.55.0


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

* [PATCH 1/2] leds: rgb: s2m: wire up of_match_table in platform driver
  2026-07-21  5:48 [PATCH 0/2] leds: s2m: wire up missing of_match_table in platform drivers kr494167
@ 2026-07-21  5:48 ` kr494167
  2026-07-21  5:48 ` [PATCH 2/2] leds: flash: " kr494167
  1 sibling, 0 replies; 3+ messages in thread
From: kr494167 @ 2026-07-21  5:48 UTC (permalink / raw)
  To: lee, pavel; +Cc: kauschluss, linux-leds, linux-kernel, surendra

From: surendra <kr494167@gmail.com>

The driver defines and registers s2m_rgb_of_match_table via
MODULE_DEVICE_TABLE(of, ...) but never assigns it to the platform
driver's .of_match_table field.  As a result the kernel never matches
this driver against a DT node with compatible "samsung,s2mu005-rgb",
making the MODULE_DEVICE_TABLE entry dead code.

Wire the table up so that DT-based probing and module auto-loading
work as intended.

Fixes: 63ccd117f425 ("leds: rgb: Add support for Samsung S2M series PMIC RGB LED device")
Signed-off-by: surendra <kr494167@gmail.com>
---
 drivers/leds/rgb/leds-s2m-rgb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/leds/rgb/leds-s2m-rgb.c b/drivers/leds/rgb/leds-s2m-rgb.c
index d239f54eee90..28964de6920c 100644
--- a/drivers/leds/rgb/leds-s2m-rgb.c
+++ b/drivers/leds/rgb/leds-s2m-rgb.c
@@ -415,6 +415,7 @@ MODULE_DEVICE_TABLE(of, s2m_rgb_of_match_table);
 static struct platform_driver s2m_rgb_driver = {
 	.driver = {
 		.name = "s2m-rgb",
+		.of_match_table = s2m_rgb_of_match_table,
 	},
 	.probe = s2m_rgb_probe,
 	.id_table = s2m_rgb_id_table,
-- 
2.55.0


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

* [PATCH 2/2] leds: flash: s2m: wire up of_match_table in platform driver
  2026-07-21  5:48 [PATCH 0/2] leds: s2m: wire up missing of_match_table in platform drivers kr494167
  2026-07-21  5:48 ` [PATCH 1/2] leds: rgb: s2m: wire up of_match_table in platform driver kr494167
@ 2026-07-21  5:48 ` kr494167
  1 sibling, 0 replies; 3+ messages in thread
From: kr494167 @ 2026-07-21  5:48 UTC (permalink / raw)
  To: lee, pavel; +Cc: kauschluss, linux-leds, linux-kernel, surendra

From: surendra <kr494167@gmail.com>

The driver defines and registers s2m_fled_of_match_table via
MODULE_DEVICE_TABLE(of, ...) but never assigns it to the platform
driver's .of_match_table field.  As a result the kernel never matches
this driver against a DT node with compatible "samsung,s2mu005-flash",
making the MODULE_DEVICE_TABLE entry dead code.

Wire the table up so that DT-based probing and module auto-loading
work as intended.

Fixes: 02149db273a9 ("leds: flash: Add support for Samsung S2M series PMIC flash LED device")
Signed-off-by: surendra <kr494167@gmail.com>
---
 drivers/leds/flash/leds-s2m-flash.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/leds/flash/leds-s2m-flash.c b/drivers/leds/flash/leds-s2m-flash.c
index 6ee8db094611..2373a70d83eb 100644
--- a/drivers/leds/flash/leds-s2m-flash.c
+++ b/drivers/leds/flash/leds-s2m-flash.c
@@ -339,6 +339,7 @@ MODULE_DEVICE_TABLE(of, s2m_fled_of_match_table);
 static struct platform_driver s2m_fled_driver = {
 	.driver = {
 		.name = "s2m-flash",
+		.of_match_table = s2m_fled_of_match_table,
 	},
 	.probe = s2m_fled_probe,
 	.id_table = s2m_fled_id_table,
-- 
2.55.0


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

end of thread, other threads:[~2026-07-21  5:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-21  5:48 [PATCH 0/2] leds: s2m: wire up missing of_match_table in platform drivers kr494167
2026-07-21  5:48 ` [PATCH 1/2] leds: rgb: s2m: wire up of_match_table in platform driver kr494167
2026-07-21  5:48 ` [PATCH 2/2] leds: flash: " kr494167

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

all inboxes | Powered by JetHome®