Skip to content

Commit 309005e

Browse files
tq-steinagregkh
authored andcommitted
usb: phy: generic: Use proper helper for property detection
Since commit c141ecc ("of: Warn when of_property_read_bool() is used on non-boolean properties") a warning is raised if this function is used for property detection. of_property_present() is the correct helper for this. Signed-off-by: Alexander Stein <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9e8b214 commit 309005e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/phy/phy-generic.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop)
212212
if (of_property_read_u32(node, "clock-frequency", &clk_rate))
213213
clk_rate = 0;
214214

215-
needs_clk = of_property_read_bool(node, "clocks");
215+
needs_clk = of_property_present(node, "clocks");
216216
}
217217
nop->gpiod_reset = devm_gpiod_get_optional(dev, "reset",
218218
GPIOD_ASIS);

0 commit comments

Comments
 (0)