From 62de73eaf13ff0d81c1ad72b8ed98836420c1143 Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Tue, 29 Oct 2019 18:36:16 +0000 Subject: [PATCH] arm64: rockchip: typec_phy: Rename timeout to retry Declare retry in the function scope. Rename it to retry as there is a timeout function which was causing to code to compile. Reported by: jhibbits MFC after: 1 month X-MFC-WITH: r354089 --- sys/arm64/rockchip/rk_typec_phy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm64/rockchip/rk_typec_phy.c b/sys/arm64/rockchip/rk_typec_phy.c index faac525d18f8..35e677e3bfee 100644 --- a/sys/arm64/rockchip/rk_typec_phy.c +++ b/sys/arm64/rockchip/rk_typec_phy.c @@ -191,7 +191,7 @@ rk_typec_phy_enable(struct phynode *phynode, bool enable) device_t dev; intptr_t phy; uint32_t reg; - int err; + int err, retry; dev = phynode_get_device(phynode); phy = phynode_get_id(phynode); @@ -271,13 +271,13 @@ rk_typec_phy_enable(struct phynode *phynode, bool enable) hwreset_deassert(sc->rst_uphy); - for (int timeout = 10000; timeout > 0; timeout--) { + for (retry = 10000; retry > 0; retry--) { reg = RK_TYPEC_PHY_READ(sc, PMA_CMN_CTRL1); if (reg & PMA_CMN_CTRL1_READY) break; DELAY(10); } - if (timeout == 0) { + if (retry == 0) { device_printf(sc->dev, "Timeout waiting for PMA\n"); return (ENXIO); }