svn commit: r354152 - head/sys/arm64/rockchip
Emmanuel Vadot
manu at FreeBSD.org
Tue Oct 29 18:36:17 UTC 2019
Author: manu
Date: Tue Oct 29 18:36:16 2019
New Revision: 354152
URL: https://svnweb.freebsd.org/changeset/base/354152
Log:
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
Modified:
head/sys/arm64/rockchip/rk_typec_phy.c
Modified: head/sys/arm64/rockchip/rk_typec_phy.c
==============================================================================
--- head/sys/arm64/rockchip/rk_typec_phy.c Tue Oct 29 18:24:36 2019 (r354151)
+++ head/sys/arm64/rockchip/rk_typec_phy.c Tue Oct 29 18:36:16 2019 (r354152)
@@ -191,7 +191,7 @@ rk_typec_phy_enable(struct phynode *phynode, bool enab
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 enab
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);
}
More information about the svn-src-all
mailing list