Commit faf2f8c5 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] uhci-hcd misc

This has two minor tweaks to the uhci-hcd driver:

- removes some duplicated code (HCD framework does that test)
- corrects a FIXME comment (no issue)
parent 0034a01a
...@@ -1502,10 +1502,6 @@ static int uhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, int mem_flags) ...@@ -1502,10 +1502,6 @@ static int uhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, int mem_flags)
break; break;
case PIPE_ISOCHRONOUS: case PIPE_ISOCHRONOUS:
if (urb->bandwidth == 0) { /* not yet checked/allocated */ if (urb->bandwidth == 0) { /* not yet checked/allocated */
if (urb->number_of_packets <= 0) {
ret = -EINVAL;
break;
}
bustime = usb_check_bandwidth(urb->dev, urb); bustime = usb_check_bandwidth(urb->dev, urb);
if (bustime < 0) { if (bustime < 0) {
ret = bustime; ret = bustime;
......
...@@ -52,7 +52,7 @@ static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf) ...@@ -52,7 +52,7 @@ static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf)
outw(status, io_addr + USBPORTSC1 + 2 * (wIndex-1)) outw(status, io_addr + USBPORTSC1 + 2 * (wIndex-1))
// FIXME: Shouldn't this return the length of the data too? /* size of returned buffer is part of USB spec */
static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
u16 wIndex, char *buf, u16 wLength) u16 wIndex, char *buf, u16 wLength)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment