Skip to contentSkip to conversation

hwmon: ltc4283: add missing MODULE_DEVICE_TABLE for OF match table

PATCH Applied [email protected] 3 participants 3 messages Jul 21 – Jul 23

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: ltc4283: add missing MODULE_DEVICE_TABLE for OF match table

From: surendra <[email protected]>

The driver registers ltc4283_of_match as the platform driver's .of_match_table so the kernel probes the device when a DT node with compatible "adi,ltc4283" is present, but the corresponding MODULE_DEVICE_TABLE(of, ...) call is absent.

Without it the module alias table (modules.alias) does not contain an "of:N*T*Cadi,ltc4283" entry, so udev / kmod cannot auto-load the module when the DT node appears, breaking modules-based deployments while built-in configurations happen to work by accident.

Add the missing MODULE_DEVICE_TABLE() to fix module auto-loading.

Fixes dd63353a0b5e ("hwmon: ltc4283: Add support for the LTC4283 Swap Controller")
---
 drivers/hwmon/ltc4283.c | 1 +
 1 file changed, 1 insertion(+)
drivers/hwmon/ltc4283.c +1 -0
index 9b85293ea664..9ec409bc2648 100644
@@ -1772,6 +1772,7 @@ static const struct of_device_id ltc4283_of_match[] = {
 	{ .compatible = "adi,ltc4283" },
 	{ }
 };
+MODULE_DEVICE_TABLE(of, ltc4283_of_match);
 
 static const struct i2c_device_id ltc4283_i2c_id[] = {
 	{ "ltc4283" },
Signature · 1 line
2.55.0
#1 lore raw
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 12 lines

From: surendra <[email protected]>

The driver registers ltc4283_of_match as the platform driver's .of_match_table so the kernel probes the device when a DT node with compatible "adi,ltc4283" is present, but the corresponding MODULE_DEVICE_TABLE(of, ...) call is absent.

Without it the module alias table (modules.alias) does not contain an "of:N*T*Cadi,ltc4283" entry, so udev / kmod cannot auto-load the module when the DT node appears, breaking modules-based deployments while built-in configurations happen to work by accident.

Quoted 4 lines

Add the missing MODULE_DEVICE_TABLE() to fix module auto-loading.

Fixes dd63353a0b5e ("hwmon: ltc4283: Add support for the LTC4283 Swap Controller")

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer Applied
#2 lore raw
In reply to [email protected]
Quoted 12 lines · On Tue, Jul 21, 2026 at 11:20:22AM +0530, [email protected] wrote:

From: surendra <[email protected]>

The driver registers ltc4283_of_match as the platform driver's .of_match_table so the kernel probes the device when a DT node with compatible "adi,ltc4283" is present, but the corresponding MODULE_DEVICE_TABLE(of, ...) call is absent.

Without it the module alias table (modules.alias) does not contain an "of:N*T*Cadi,ltc4283" entry, so udev / kmod cannot auto-load the module when the DT node appears, breaking modules-based deployments while built-in configurations happen to work by accident.

Quoted 4 lines

Add the missing MODULE_DEVICE_TABLE() to fix module auto-loading.

Fixes dd63353a0b5e ("hwmon: ltc4283: Add support for the LTC4283 Swap Controller")

Applied.

Thanks,
Guenter

Quoted 16 lines
---
 drivers/hwmon/ltc4283.c | 1 +
 1 file changed, 1 insertion(+)
drivers/hwmon/ltc4283.c +1 -0
index 9b85293ea664..9ec409bc2648 100644
@@ -1772,6 +1772,7 @@ static const struct of_device_id ltc4283_of_match[] = {
 	{ .compatible = "adi,ltc4283" },
 	{ }
 };
+MODULE_DEVICE_TABLE(of, ltc4283_of_match);
 
 static const struct i2c_device_id ltc4283_i2c_id[] = {
 	{ "ltc4283" },