diff options
Diffstat (limited to 'drivers/usb/phy/phy-gpio-vbus-usb.c')
-rw-r--r-- | drivers/usb/phy/phy-gpio-vbus-usb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/phy/phy-gpio-vbus-usb.c b/drivers/usb/phy/phy-gpio-vbus-usb.c index f4b14bd97e14..7a6be3e5dc23 100644 --- a/drivers/usb/phy/phy-gpio-vbus-usb.c +++ b/drivers/usb/phy/phy-gpio-vbus-usb.c | |||
@@ -121,7 +121,7 @@ static void gpio_vbus_work(struct work_struct *work) | |||
121 | 121 | ||
122 | if (vbus) { | 122 | if (vbus) { |
123 | status = USB_EVENT_VBUS; | 123 | status = USB_EVENT_VBUS; |
124 | gpio_vbus->phy.state = OTG_STATE_B_PERIPHERAL; | 124 | gpio_vbus->phy.otg->state = OTG_STATE_B_PERIPHERAL; |
125 | gpio_vbus->phy.last_event = status; | 125 | gpio_vbus->phy.last_event = status; |
126 | usb_gadget_vbus_connect(gpio_vbus->phy.otg->gadget); | 126 | usb_gadget_vbus_connect(gpio_vbus->phy.otg->gadget); |
127 | 127 | ||
@@ -143,7 +143,7 @@ static void gpio_vbus_work(struct work_struct *work) | |||
143 | 143 | ||
144 | usb_gadget_vbus_disconnect(gpio_vbus->phy.otg->gadget); | 144 | usb_gadget_vbus_disconnect(gpio_vbus->phy.otg->gadget); |
145 | status = USB_EVENT_NONE; | 145 | status = USB_EVENT_NONE; |
146 | gpio_vbus->phy.state = OTG_STATE_B_IDLE; | 146 | gpio_vbus->phy.otg->state = OTG_STATE_B_IDLE; |
147 | gpio_vbus->phy.last_event = status; | 147 | gpio_vbus->phy.last_event = status; |
148 | 148 | ||
149 | atomic_notifier_call_chain(&gpio_vbus->phy.notifier, | 149 | atomic_notifier_call_chain(&gpio_vbus->phy.notifier, |
@@ -196,7 +196,7 @@ static int gpio_vbus_set_peripheral(struct usb_otg *otg, | |||
196 | set_vbus_draw(gpio_vbus, 0); | 196 | set_vbus_draw(gpio_vbus, 0); |
197 | 197 | ||
198 | usb_gadget_vbus_disconnect(otg->gadget); | 198 | usb_gadget_vbus_disconnect(otg->gadget); |
199 | otg->phy->state = OTG_STATE_UNDEFINED; | 199 | otg->state = OTG_STATE_UNDEFINED; |
200 | 200 | ||
201 | otg->gadget = NULL; | 201 | otg->gadget = NULL; |
202 | return 0; | 202 | return 0; |
@@ -218,7 +218,7 @@ static int gpio_vbus_set_power(struct usb_phy *phy, unsigned mA) | |||
218 | 218 | ||
219 | gpio_vbus = container_of(phy, struct gpio_vbus_data, phy); | 219 | gpio_vbus = container_of(phy, struct gpio_vbus_data, phy); |
220 | 220 | ||
221 | if (phy->state == OTG_STATE_B_PERIPHERAL) | 221 | if (phy->otg->state == OTG_STATE_B_PERIPHERAL) |
222 | set_vbus_draw(gpio_vbus, mA); | 222 | set_vbus_draw(gpio_vbus, mA); |
223 | return 0; | 223 | return 0; |
224 | } | 224 | } |
@@ -269,8 +269,8 @@ static int gpio_vbus_probe(struct platform_device *pdev) | |||
269 | gpio_vbus->phy.dev = gpio_vbus->dev; | 269 | gpio_vbus->phy.dev = gpio_vbus->dev; |
270 | gpio_vbus->phy.set_power = gpio_vbus_set_power; | 270 | gpio_vbus->phy.set_power = gpio_vbus_set_power; |
271 | gpio_vbus->phy.set_suspend = gpio_vbus_set_suspend; | 271 | gpio_vbus->phy.set_suspend = gpio_vbus_set_suspend; |
272 | gpio_vbus->phy.state = OTG_STATE_UNDEFINED; | ||
273 | 272 | ||
273 | gpio_vbus->phy.otg->state = OTG_STATE_UNDEFINED; | ||
274 | gpio_vbus->phy.otg->phy = &gpio_vbus->phy; | 274 | gpio_vbus->phy.otg->phy = &gpio_vbus->phy; |
275 | gpio_vbus->phy.otg->set_peripheral = gpio_vbus_set_peripheral; | 275 | gpio_vbus->phy.otg->set_peripheral = gpio_vbus_set_peripheral; |
276 | 276 | ||