hwmon: (lm75) Add explicit header include
PATCH 1/1 hwmon: (lm75) Add explicit header include
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.
--- drivers/hwmon/lm75.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/hwmon/lm75.c +3 -2
@@ -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,
Signature · 1 line
2.34.1
Reviewed-by: Sashiko <[email protected]>
Quoted 8 lines
Since
device_property_read_string()is used in the probe function add explicit include forlinux/mod_devicetable.handlinux/property.hrather than having implicit inclusions.
Headerlinux/of.hcan be removed and alsoof_match_ptr()improving non-Device Tree compatibility of the driver.Signed-off-by Flaviu Nistor <[email protected]>
Quoted 11 lines · On 16/05/2026 10:06, [email protected] wrote:
Quoted 8 lines
Since
device_property_read_string()is used in the probe function add explicit include forlinux/mod_devicetable.handlinux/property.hrather than having implicit inclusions.
Headerlinux/of.hcan be removed and alsoof_match_ptr()improving non-Device Tree compatibility of the driver.Signed-off-by Flaviu Nistor <[email protected]>Reviewed-by Sashiko <[email protected]>
NAK, fake tag.
https://lore.kernel.org/r/[email protected]
Best regards,
Krzysztof
Guenter Roeck
maintainerQuoted 8 lines · Krzysztof Kozlowski
Quoted 7 lines · On 16/05/2026 10:06, [email protected] wrote:
Quoted 7 lines
Since
device_property_read_string()is used in the probe function add explicit include forlinux/mod_devicetable.handlinux/property.hrather than having implicit inclusions.
Headerlinux/of.hcan be removed and alsoof_match_ptr()improving non-Device Tree compatibility of the driver.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Flaviu Nistor <[email protected]>Reviewed-by Sashiko <[email protected]>NAK, fake tag.
Until and unless there is an official policy that explicitly states that AI agents MUST NOT provide Reviewed-by: tags, I will ignore your NAKs on patches submitted in my scope of responsibility. Please point to the policy, not to your opinion about review feedback from AI agents.
Thanks,
Guenter
Guenter Roeck
maintainerQuoted 7 lines · Flaviu Nistor
Since
device_property_read_string()is used in the probe function add explicit include forlinux/mod_devicetable.handlinux/property.hrather than having implicit inclusions.
Headerlinux/of.hcan be removed and alsoof_match_ptr()improving non-Device Tree compatibility of the driver.
Line breaks should be at column 75. There are way too many line breaks above.
Quoted 19 lines
--- drivers/hwmon/lm75.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/hwmon/lm75.c +2
-1@@ -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>
drivers/hwmon/lm75.c static struct i2c_driver lm75_i2c_driver = { · line 1156
Quoted 5 lines
drivers/hwmon/lm75.c +1
-1@@ -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,
With this, the __maybe_unused in the declaration of lm75_of_match is no longer necessary. Please drop.
Thanks,
Guenter