summaryrefslogtreecommitdiff
path: root/drivers/hwmon/ltc4245.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 17:47:07 +0300
committerGuenter Roeck <linux@roeck-us.net>2023-04-19 17:08:31 +0300
commit50c3480b6db859ce2c5f524eedb74973342455d0 (patch)
tree362c9efe14a2fcff8ddc253e49c67b03b7fe231d /drivers/hwmon/ltc4245.c
parent08d40c1d57b7127cfdebbc0648b57d54e38f2ba7 (diff)
downloadlinux-50c3480b6db859ce2c5f524eedb74973342455d0.tar.xz
hwmon: (ltc4245) Use of_property_read_bool() for boolean properties
It is preferred to use typed property access functions (i.e. of_property_read_<type> functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to of_property_read_bool(). Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230310144707.1542525-1-robh@kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/ltc4245.c')
-rw-r--r--drivers/hwmon/ltc4245.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/ltc4245.c b/drivers/hwmon/ltc4245.c
index 5088d28b3a7c..57cbaf3b39fa 100644
--- a/drivers/hwmon/ltc4245.c
+++ b/drivers/hwmon/ltc4245.c
@@ -434,7 +434,7 @@ static bool ltc4245_use_extra_gpios(struct i2c_client *client)
return pdata->use_extra_gpios;
/* fallback on OF */
- if (of_find_property(np, "ltc4245,use-extra-gpios", NULL))
+ if (of_property_read_bool(np, "ltc4245,use-extra-gpios"))
return true;
return false;