diff options
| author | Flaviu Nistor <flaviu.nistor@gmail.com> | 2026-05-22 08:23:52 +0300 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2026-06-09 08:23:09 -0700 |
| commit | d0154a9422eed727a37ac8efad18216e5db0757a (patch) | |
| tree | ae3b0a3729b6a48c9fb3f980f1c5de559ec458cd /drivers/hwmon | |
| parent | 964acc34569677e6725812172c3d1a28b3973277 (diff) | |
| download | linux-next-d0154a9422eed727a37ac8efad18216e5db0757a.tar.gz linux-next-d0154a9422eed727a37ac8efad18216e5db0757a.zip | |
hwmon: (adt7475) Add explicit header include
Since device_property_read_string() and similar functions defined in
linux/property.h are used in the driver add explicit include for
linux/mod_devicetable.h and linux/property.h rather than having implicit
inclusions.
Removed of_match_ptr() improving non-Device Tree compatibility of the
driver and drop unnecessary __maybe_unused.
Header linux/of.h can't be removed yet since macro is_of_node() is used.
Signed-off-by: Flaviu Nistor <flaviu.nistor@gmail.com>
Link: https://lore.kernel.org/r/20260522052352.12139-1-flaviu.nistor@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
| -rw-r--r-- | drivers/hwmon/adt7475.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c index 7fb96f5395fa..7241fc73d21a 100644 --- a/drivers/hwmon/adt7475.c +++ b/drivers/hwmon/adt7475.c @@ -19,6 +19,8 @@ #include <linux/err.h> #include <linux/jiffies.h> #include <linux/of.h> +#include <linux/mod_devicetable.h> +#include <linux/property.h> #include <linux/util_macros.h> #include <dt-bindings/pwm/pwm.h> @@ -173,7 +175,7 @@ static const struct i2c_device_id adt7475_id[] = { }; MODULE_DEVICE_TABLE(i2c, adt7475_id); -static const struct of_device_id __maybe_unused adt7475_of_match[] = { +static const struct of_device_id adt7475_of_match[] = { { .compatible = "adi,adt7473", .data = (void *)adt7473 @@ -1995,7 +1997,7 @@ static struct i2c_driver adt7475_driver = { .class = I2C_CLASS_HWMON, .driver = { .name = "adt7475", - .of_match_table = of_match_ptr(adt7475_of_match), + .of_match_table = adt7475_of_match, }, .probe = adt7475_probe, .id_table = adt7475_id, |
