Message ID | 1479475723-4857-20-git-send-email-kishon@ti.com |
---|---|
State | Accepted |
Commit | dd796e921ea571624fcd8685f214fdfd4406101f |
Headers | show |
diff --git a/drivers/phy/phy-rockchip-inno-usb2.c b/drivers/phy/phy-rockchip-inno-usb2.c index eb89de5..2f99ec9 100644 --- a/drivers/phy/phy-rockchip-inno-usb2.c +++ b/drivers/phy/phy-rockchip-inno-usb2.c @@ -714,7 +714,7 @@ static void rockchip_chg_detect_work(struct work_struct *work) delay = CHG_SECONDARY_DET_TIME; rphy->chg_state = USB_CHG_STATE_PRIMARY_DONE; } else { - if (tmout) { + if (rphy->dcd_retries == CHG_DCD_MAX_RETRIES) { /* floating charger found */ rphy->chg_type = POWER_SUPPLY_TYPE_USB_DCP; rphy->chg_state = USB_CHG_STATE_DETECTED;