diff mbox series

hwmon: ntc_thermistor: fix module autoloading

Message ID 20240815083021.756134-1-liuyuntao12@huawei.com (mailing list archive)
State Accepted
Headers show
Series hwmon: ntc_thermistor: fix module autoloading | expand

Commit Message

liuyuntao (F) Aug. 15, 2024, 8:30 a.m. UTC
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
based on the alias from of_device_id table.

Fixes: 9e8269de100dd (hwmon: (ntc_thermistor) Add DT with IIO support to NTC thermistor driver)
Signed-off-by: Yuntao Liu <liuyuntao12@huawei.com>
---
 drivers/hwmon/ntc_thermistor.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Guenter Roeck Aug. 16, 2024, 2:09 p.m. UTC | #1
On Thu, Aug 15, 2024 at 08:30:21AM +0000, Yuntao Liu wrote:
> Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
> based on the alias from of_device_id table.
> 
> Fixes: 9e8269de100dd (hwmon: (ntc_thermistor) Add DT with IIO support to NTC thermistor driver)
> Signed-off-by: Yuntao Liu <liuyuntao12@huawei.com>

Applied.

In the future, please run checkpatch on your patches. Your Fixes: tag is wrong.

Thanks,
Guenter
diff mbox series

Patch

diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
index ef75b63f5894..b5352900463f 100644
--- a/drivers/hwmon/ntc_thermistor.c
+++ b/drivers/hwmon/ntc_thermistor.c
@@ -62,6 +62,7 @@  static const struct platform_device_id ntc_thermistor_id[] = {
 	[NTC_SSG1404001221]   = { "ssg1404_001221",  TYPE_NCPXXWB473 },
 	[NTC_LAST]            = { },
 };
+MODULE_DEVICE_TABLE(platform, ntc_thermistor_id);
 
 /*
  * A compensation table should be sorted by the values of .ohm