phy: exynos-usb: Fix referenct counting
authorKamil Debski <k.debski@samsung.com>
Tue, 1 Oct 2013 13:48:13 +0000 (15:48 +0200)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:44:52 +0000 (11:44 +0900)
This patch fixes the reference counting when powerin on/off the phy.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
drivers/phy/phy-exynos4210-usb.c

index 4b849e7..d75a554 100644 (file)
@@ -250,7 +250,7 @@ static int exynos4210_power_off(struct uphy_instance *inst)
        }
 
        inst->state = STATE_OFF;
-       inst->ref_cnt++;
+       inst->ref_cnt--;
        if (inst->ref_cnt > 0)
                return 0;