diff options
-rw-r--r-- | drivers/usb/phy/phy-generic.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c index 48af0687bf11..70be50b734b2 100644 --- a/drivers/usb/phy/phy-generic.c +++ b/drivers/usb/phy/phy-generic.c | |||
@@ -64,11 +64,12 @@ static int nop_set_suspend(struct usb_phy *x, int suspend) | |||
64 | 64 | ||
65 | static void nop_reset_set(struct usb_phy_generic *nop, int asserted) | 65 | static void nop_reset_set(struct usb_phy_generic *nop, int asserted) |
66 | { | 66 | { |
67 | if (nop->gpiod_reset) | 67 | if (!nop->gpiod_reset) |
68 | gpiod_set_value(nop->gpiod_reset, asserted); | 68 | return; |
69 | 69 | ||
70 | if (!asserted) | 70 | gpiod_direction_output(nop->gpiod_reset, !asserted); |
71 | usleep_range(10000, 20000); | 71 | usleep_range(10000, 20000); |
72 | gpiod_set_value(nop->gpiod_reset, asserted); | ||
72 | } | 73 | } |
73 | 74 | ||
74 | /* interface to regulator framework */ | 75 | /* interface to regulator framework */ |