Skip to content

Commit c678917

Browse files
robherringBartosz Golaszewski
authored andcommitted
gpio: Use of_property_present() for non-boolean properties
The use of of_property_read_bool() for non-boolean properties is deprecated in favor of of_property_present() when testing for property presence. Signed-off-by: Rob Herring (Arm) <[email protected]> Reviewed-by: Dragan Simic <[email protected]> Reviewed-by: Heiko Stuebner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent a987b78 commit c678917

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/gpio/gpio-rockchip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ static int rockchip_gpiolib_register(struct rockchip_pin_bank *bank)
602602
* files which don't set the "gpio-ranges" property or systems that
603603
* utilize ACPI the driver has to call gpiochip_add_pin_range().
604604
*/
605-
if (!of_property_read_bool(bank->of_node, "gpio-ranges")) {
605+
if (!of_property_present(bank->of_node, "gpio-ranges")) {
606606
struct device_node *pctlnp = of_get_parent(bank->of_node);
607607
struct pinctrl_dev *pctldev = NULL;
608608

drivers/gpio/gpiolib-of.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ static void of_gpio_flags_quirks(const struct device_node *np,
337337
* to determine if the flags should have inverted semantics.
338338
*/
339339
if (IS_ENABLED(CONFIG_SPI_MASTER) && !strcmp(propname, "cs-gpios") &&
340-
of_property_read_bool(np, "cs-gpios")) {
340+
of_property_present(np, "cs-gpios")) {
341341
u32 cs;
342342
int ret;
343343

0 commit comments

Comments
 (0)