diff options
author | Alexander Stein <alexander.stein@ew.tq-group.com> | 2025-01-20 15:42:51 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-03-22 12:56:46 -0700 |
commit | 215e8c44a39c51431b4b31691ae23a3f0cca646f (patch) | |
tree | 95042501754c7d0a7e2fcf07a047ebfdaa331efb /drivers/usb | |
parent | 6bbf1b19141db4c5ae6bc20697fafa4cf08472eb (diff) | |
download | linux-215e8c44a39c51431b4b31691ae23a3f0cca646f.tar.gz linux-215e8c44a39c51431b4b31691ae23a3f0cca646f.tar.bz2 linux-215e8c44a39c51431b4b31691ae23a3f0cca646f.zip |
usb: phy: generic: Use proper helper for property detection
[ Upstream commit 309005e448c1f3e4b81e4416406991b7c3339c1d ]
Since commit c141ecc3cecd7 ("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 <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20250120144251.580981-1-alexander.stein@ew.tq-group.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/phy/phy-generic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c index 6c3ececf9137..8423be59ec0f 100644 --- a/drivers/usb/phy/phy-generic.c +++ b/drivers/usb/phy/phy-generic.c @@ -212,7 +212,7 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop) if (of_property_read_u32(node, "clock-frequency", &clk_rate)) clk_rate = 0; - needs_clk = of_property_read_bool(node, "clocks"); + needs_clk = of_property_present(node, "clocks"); } nop->gpiod_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_ASIS); |