Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364809
b: refs/heads/master
c: 5882337
h: refs/heads/master
i:
  364807: 54a4791
v: v3
  • Loading branch information
Sakethram Bommisetti authored and Felipe Balbi committed Apr 3, 2013
1 parent 3378c89 commit 47a02c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8db12231bccc5ebf414b267af68c5a8c1e4432dd
refs/heads/master: 588233733804aeaf16335a32904aaa4d15b9bddd
17 changes: 8 additions & 9 deletions trunk/drivers/usb/phy/phy-ab8500-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,17 +614,16 @@ static int ab8500_usb_set_peripheral(struct usb_otg *otg,

ab = phy_to_ab(otg->phy);

ab->phy.otg->gadget = gadget;

/* Some drivers call this function in atomic context.
* Do not update ab8500 registers directly till this
* is fixed.
*/

if (!gadget) {
otg->gadget = NULL;
if ((ab->mode != USB_IDLE) && (!gadget)) {
ab->mode = USB_IDLE;
schedule_work(&ab->phy_dis_work);
} else {
otg->gadget = gadget;
otg->phy->state = OTG_STATE_B_IDLE;
}

return 0;
Expand All @@ -639,16 +638,16 @@ static int ab8500_usb_set_host(struct usb_otg *otg, struct usb_bus *host)

ab = phy_to_ab(otg->phy);

ab->phy.otg->host = host;

/* Some drivers call this function in atomic context.
* Do not update ab8500 registers directly till this
* is fixed.
*/

if (!host) {
otg->host = NULL;
if ((ab->mode != USB_IDLE) && (!host)) {
ab->mode = USB_IDLE;
schedule_work(&ab->phy_dis_work);
} else {
otg->host = host;
}

return 0;
Expand Down

0 comments on commit 47a02c6

Please sign in to comment.