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 | |
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')
-rw-r--r-- | sys/dev/usb/uhid.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/ums.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/usbdi_util.c | 15 | ||||
-rw-r--r-- | sys/dev/usb/usbdi_util.h | 8 |
4 files changed, 15 insertions, 16 deletions
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index ca49ac9..8f03247 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhid.c,v 1.44 2001/09/15 16:16:28 yamt Exp $ */ +/* $NetBSD: uhid.c,v 1.45 2001/10/26 17:58:21 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -248,7 +248,7 @@ USB_ATTACH(uhid) } } else { desc = NULL; - err = usbd_alloc_report_desc(uaa->iface, &desc, &size,M_USBDEV); + err = usbd_read_report_desc(uaa->iface, &desc, &size,M_USBDEV); } if (err) { diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index 0716a15..0c89724 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -179,7 +179,7 @@ USB_MATCH(ums) if (!id || id->bInterfaceClass != UICLASS_HID) return (UMATCH_NONE); - err = usbd_alloc_report_desc(uaa->iface, &desc, &size, M_TEMP); + err = usbd_read_report_desc(uaa->iface, &desc, &size, M_TEMP); if (err) return (UMATCH_NONE); @@ -237,7 +237,7 @@ USB_ATTACH(ums) USB_ATTACH_ERROR_RETURN; } - err = usbd_alloc_report_desc(uaa->iface, &desc, &size, M_TEMP); + err = usbd_read_report_desc(uaa->iface, &desc, &size, M_TEMP); if (err) USB_ATTACH_ERROR_RETURN; 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; diff --git a/sys/dev/usb/usbdi_util.h b/sys/dev/usb/usbdi_util.h index ca8c82a..16e8b1d 100644 --- a/sys/dev/usb/usbdi_util.h +++ b/sys/dev/usb/usbdi_util.h @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi_util.h,v 1.22 2000/06/01 14:37:52 augustss Exp $ */ +/* $NetBSD: usbdi_util.h,v 1.23 2001/10/26 17:58:22 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -56,7 +56,7 @@ usbd_status usbd_get_device_status(usbd_device_handle, usb_status_t *); usbd_status usbd_get_hub_status(usbd_device_handle, usb_hub_status_t *); usbd_status usbd_set_protocol(usbd_interface_handle dev, int report); usbd_status usbd_get_report_descriptor(usbd_device_handle dev, int ifcno, - int repid, int size, void *d); + int size, void *d); struct usb_hid_descriptor *usbd_get_hid_descriptor(usbd_interface_handle ifc); usbd_status usbd_set_report(usbd_interface_handle iface, int type, int id, void *data,int len); @@ -65,8 +65,8 @@ usbd_status usbd_set_report_async(usbd_interface_handle iface, int type, usbd_status usbd_get_report(usbd_interface_handle iface, int type, int id, void *data, int len); usbd_status usbd_set_idle(usbd_interface_handle iface, int duration, int id); -usbd_status usbd_alloc_report_desc(usbd_interface_handle ifc, void **descp, - int *sizep, usb_malloc_type mem); +usbd_status usbd_read_report_desc(usbd_interface_handle ifc, void **descp, + int *sizep, usb_malloc_type mem); usbd_status usbd_get_config(usbd_device_handle dev, u_int8_t *conf); usbd_status usbd_get_string_desc(usbd_device_handle dev, int sindex, int langid, usb_string_descriptor_t *sdesc); |