[PATCH] hwmon: (lm75) Add explicit header include

From: Flaviu Nistor

Date: Sat May 16 2026 - 03:57:23 EST


Since device_property_read_string() is used in the
probe function add explicit include for
linux/mod_devicetable.h and linux/property.h rather
than having implicit inclusions.
Header linux/of.h can be removed and also of_match_ptr()
improving non-Device Tree compatibility of the driver.

Signed-off-by: Flaviu Nistor <flaviu.nistor@xxxxxxxxx>
---
drivers/hwmon/lm75.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index 845a0e09ea9f..32279049d44c 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -14,7 +14,8 @@
#include <linux/i3c/device.h>
#include <linux/hwmon.h>
#include <linux/err.h>
-#include <linux/of.h>
+#include <linux/mod_devicetable.h>
+#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/util_macros.h>
#include <linux/regulator/consumer.h>
@@ -1152,7 +1153,7 @@ static struct i2c_driver lm75_i2c_driver = {
.class = I2C_CLASS_HWMON,
.driver = {
.name = "lm75",
- .of_match_table = of_match_ptr(lm75_of_match),
+ .of_match_table = lm75_of_match,
.pm = LM75_DEV_PM_OPS,
},
.probe = lm75_i2c_probe,
--
2.34.1