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

From: kr494167

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


From: surendra <kr494167@xxxxxxxxx>

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