[PATCH 1/2] leds: rgb: s2m: wire up of_match_table in platform driver

From: kr494167

Date: Tue Jul 21 2026 - 01:49:40 EST


From: surendra <kr494167@xxxxxxxxx>

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@xxxxxxxxx>
---
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