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>
This commit is contained in:
Rob Herring 2023-03-10 08:47:07 -06:00 committed by Guenter Roeck
parent 08d40c1d57
commit 50c3480b6d

View File

@ -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;