diff options
author | joe <joe@FreeBSD.org> | 2002-04-07 17:13:00 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2002-04-07 17:13:00 +0000 |
commit | 0a89552c08a28a463d52c436c0618dd12e9d2847 (patch) | |
tree | f28173abec3cd12497dcc157e0a2d1c3cb596abb /sys/dev/usb/usbdi_util.c | |
parent | 922292c1c5fa3b5ab632da8f173d579b5ec6091b (diff) | |
download | FreeBSD-src-0a89552c08a28a463d52c436c0618dd12e9d2847.zip FreeBSD-src-0a89552c08a28a463d52c436c0618dd12e9d2847.tar.gz |
MFNetBSD: uhid.c (1.45), ums.c (1.49), usbdi_util.c (1.35), usbdi_util.h (1.23)
date: 2001/10/26 17:58:21; author: augustss;
s/usbd_alloc_report_desc/usbd_read_report_desc/
Diffstat (limited to 'sys/dev/usb/usbdi_util.c')
-rw-r--r-- | sys/dev/usb/usbdi_util.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/dev/usb/usbdi_util.c b/sys/dev/usb/usbdi_util.c index 0e2f17b..f349f4c 100644 --- a/sys/dev/usb/usbdi_util.c +++ b/sys/dev/usb/usbdi_util.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi_util.c,v 1.33 2000/06/01 15:51:27 augustss Exp $ */ +/* $NetBSD: usbdi_util.c,v 1.35 2001/10/26 17:58:21 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -320,14 +320,14 @@ usbd_set_idle(usbd_interface_handle iface, int duration, int id) } usbd_status -usbd_get_report_descriptor(usbd_device_handle dev, int ifcno, int repid, +usbd_get_report_descriptor(usbd_device_handle dev, int ifcno, int size, void *d) { usb_device_request_t req; req.bmRequestType = UT_READ_INTERFACE; req.bRequest = UR_GET_DESCRIPTOR; - USETW2(req.wValue, UDESC_REPORT, repid); + USETW2(req.wValue, UDESC_REPORT, 0); /* report id should be 0 */ USETW(req.wIndex, ifcno); USETW(req.wLength, size); return (usbd_do_request(dev, &req, d)); @@ -361,8 +361,8 @@ usbd_get_hid_descriptor(usbd_interface_handle ifc) } usbd_status -usbd_alloc_report_desc(usbd_interface_handle ifc, void **descp, int *sizep, - usb_malloc_type mem) +usbd_read_report_desc(usbd_interface_handle ifc, void **descp, int *sizep, + usb_malloc_type mem) { usb_interface_descriptor_t *id; usb_hid_descriptor_t *hid; @@ -380,9 +380,8 @@ usbd_alloc_report_desc(usbd_interface_handle ifc, void **descp, int *sizep, *descp = malloc(*sizep, mem, M_NOWAIT); if (*descp == NULL) return (USBD_NOMEM); - /* XXX should not use 0 Report ID */ - err = usbd_get_report_descriptor(dev, id->bInterfaceNumber, 0, - *sizep, *descp); + err = usbd_get_report_descriptor(dev, id->bInterfaceNumber, + *sizep, *descp); if (err) { free(*descp, mem); *descp = NULL; |