* [PATCH AUTOSEL 6.6 04/17] usb: phy: generic: Use proper helper for property detection
[not found] <20250218202743.3593296-1-sashal@kernel.org>
@ 2025-02-18 20:27 ` Sasha Levin
0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2025-02-18 20:27 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Alexander Stein, Greg Kroah-Hartman, Sasha Levin, u.kleine-koenig,
sean.anderson, m.grzeschik, linux-usb
From: Alexander Stein <alexander.stein@ew.tq-group.com>
[ 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>
---
drivers/usb/phy/phy-generic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index 770081b828a42..2b4d2cbafe748 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -217,7 +217,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);
--
2.39.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-18 20:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250218202743.3593296-1-sashal@kernel.org>
2025-02-18 20:27 ` [PATCH AUTOSEL 6.6 04/17] usb: phy: generic: Use proper helper for property detection Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox