Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280875
b: refs/heads/master
c: 7aac8d1
h: refs/heads/master
i:
  280873: 86031f1
  280871: 76f1e06
v: v3
  • Loading branch information
Kuninori Morimoto authored and Felipe Balbi committed Dec 12, 2011
1 parent 5ffbb54 commit 85fead0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 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: 4825093e9d0692a2a1f1615ab69246ac07b17f2f
refs/heads/master: 7aac8d1537b1fd1a9e39bd16edcd6728c19f8dd5
19 changes: 8 additions & 11 deletions trunk/drivers/usb/renesas_usbhs/mod_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static int usbhsh_device_has_endpoint(struct usbhsh_device *udev)
return !list_empty(&udev->ep_list_head);
}

static struct usbhsh_device *usbhsh_device_alloc(struct usbhsh_hpriv *hpriv,
static struct usbhsh_device *usbhsh_device_attach(struct usbhsh_hpriv *hpriv,
struct urb *urb)
{
struct usbhsh_device *udev = NULL;
Expand Down Expand Up @@ -307,7 +307,7 @@ static struct usbhsh_device *usbhsh_device_alloc(struct usbhsh_hpriv *hpriv,
return udev;
}

static void usbhsh_device_free(struct usbhsh_hpriv *hpriv,
static void usbhsh_device_detach(struct usbhsh_hpriv *hpriv,
struct usbhsh_device *udev)
{
struct usb_hcd *hcd = usbhsh_hpriv_to_hcd(hpriv);
Expand Down Expand Up @@ -744,7 +744,7 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd,
struct device *dev = usbhs_priv_to_dev(priv);
struct usb_device *usbv = usbhsh_urb_to_usbv(urb);
struct usb_host_endpoint *ep = urb->ep;
struct usbhsh_device *udev, *new_udev = NULL;
struct usbhsh_device *new_udev = NULL;
int is_dir_in = usb_pipein(urb->pipe);

int ret;
Expand All @@ -756,15 +756,12 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd,
goto usbhsh_urb_enqueue_error_not_linked;

/*
* get udev
* attach udev if needed
*/
udev = usbhsh_usbv_to_udev(usbv);
if (!udev) {
new_udev = usbhsh_device_alloc(hpriv, urb);
if (!usbhsh_usbv_to_udev(usbv)) {
new_udev = usbhsh_device_attach(hpriv, urb);
if (!new_udev)
goto usbhsh_urb_enqueue_error_not_linked;

udev = new_udev;
}

/*
Expand All @@ -788,7 +785,7 @@ static int usbhsh_urb_enqueue(struct usb_hcd *hcd,

usbhsh_urb_enqueue_error_free_device:
if (new_udev)
usbhsh_device_free(hpriv, new_udev);
usbhsh_device_detach(hpriv, new_udev);
usbhsh_urb_enqueue_error_not_linked:

dev_dbg(dev, "%s error\n", __func__);
Expand Down Expand Up @@ -831,7 +828,7 @@ static void usbhsh_endpoint_disable(struct usb_hcd *hcd,
* free device
*/
if (!usbhsh_device_has_endpoint(udev))
usbhsh_device_free(hpriv, udev);
usbhsh_device_detach(hpriv, udev);
}

static int usbhsh_hub_status_data(struct usb_hcd *hcd, char *buf)
Expand Down

0 comments on commit 85fead0

Please sign in to comment.