summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/template/usb_template.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-04-22 17:08:16 +0000
committerthompsa <thompsa@FreeBSD.org>2009-04-22 17:08:16 +0000
commitd07d36e872344cbf63c8ed718e8c1201fe879fb9 (patch)
tree5467fd04839124e57ba2eecd2dcb6736316ed6f9 /sys/dev/usb/template/usb_template.c
parent7fc43d9a769b211f3caad87ea1751e8ba13c4d51 (diff)
downloadFreeBSD-src-d07d36e872344cbf63c8ed718e8c1201fe879fb9.zip
FreeBSD-src-d07d36e872344cbf63c8ed718e8c1201fe879fb9.tar.gz
MFp4 //depot/projects/usb@160930
Change the roothub exec functions to take the usb request and data pointers directly rather than placing them on the parent bus struct. Submitted by: Hans Petter Selasky
Diffstat (limited to 'sys/dev/usb/template/usb_template.c')
-rw-r--r--sys/dev/usb/template/usb_template.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/usb/template/usb_template.c b/sys/dev/usb/template/usb_template.c
index dd1a536..cc40796 100644
--- a/sys/dev/usb/template/usb_template.c
+++ b/sys/dev/usb/template/usb_template.c
@@ -81,7 +81,7 @@ static const void *usb2_temp_get_string_desc(struct usb2_device *, uint16_t,
static const void *usb2_temp_get_vendor_desc(struct usb2_device *,
const struct usb2_device_request *);
static const void *usb2_temp_get_hub_desc(struct usb2_device *);
-static void usb2_temp_get_desc(struct usb2_device *,
+static usb2_error_t usb2_temp_get_desc(struct usb2_device *,
struct usb2_device_request *, const void **, uint16_t *);
static usb2_error_t usb2_temp_setup(struct usb2_device *,
const struct usb2_temp_device_desc *);
@@ -1072,7 +1072,7 @@ usb2_temp_get_hub_desc(struct usb2_device *udev)
* This function is a demultiplexer for local USB device side control
* endpoint requests.
*------------------------------------------------------------------------*/
-static void
+static usb2_error_t
usb2_temp_get_desc(struct usb2_device *udev, struct usb2_device_request *req,
const void **pPtr, uint16_t *pLength)
{
@@ -1157,11 +1157,12 @@ tr_valid:
}
*pPtr = buf;
*pLength = len;
- return;
+ return (0); /* success */
tr_stalled:
*pPtr = NULL;
*pLength = 0;
+ return (0); /* we ignore failures */
}
/*------------------------------------------------------------------------*
OpenPOWER on IntegriCloud