summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uhid.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/uhid.c')
-rw-r--r--sys/dev/usb/uhid.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index c2939df1bf9..fca9cd5d787 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhid.c,v 1.15 2001/10/31 04:24:44 nate Exp $ */
+/* $OpenBSD: uhid.c,v 1.16 2002/05/02 20:08:04 nate Exp $ */
/* $NetBSD: uhid.c,v 1.45 2001/10/26 17:58:21 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhid.c,v 1.22 1999/11/17 22:33:43 n_hibma Exp $ */
@@ -612,9 +612,9 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr,
case USB_GET_REPORT_DESC:
rd = (struct usb_ctl_report_desc *)addr;
- size = min(sc->sc_repdesc_size, sizeof rd->data);
- rd->size = size;
- memcpy(rd->data, sc->sc_repdesc, size);
+ size = min(sc->sc_repdesc_size, sizeof rd->ucrd_data);
+ rd->ucrd_size = size;
+ memcpy(rd->ucrd_data, sc->sc_repdesc, size);
break;
case USB_SET_IMMED:
@@ -632,7 +632,7 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr,
case USB_GET_REPORT:
re = (struct usb_ctl_report *)addr;
- switch (re->report) {
+ switch (re->ucr_report) {
case UHID_INPUT_REPORT:
size = sc->sc_isize;
id = sc->sc_iid;
@@ -648,15 +648,15 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr,
default:
return (EINVAL);
}
- err = usbd_get_report(sc->sc_iface, re->report, id, re->data,
- size);
+ err = usbd_get_report(sc->sc_iface, re->ucr_report, id,
+ re->ucr_data, size);
if (err)
return (EIO);
break;
case USB_SET_REPORT:
re = (struct usb_ctl_report *)addr;
- switch (re->report) {
+ switch (re->ucr_report) {
case UHID_INPUT_REPORT:
size = sc->sc_isize;
id = sc->sc_iid;
@@ -672,7 +672,8 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr,
default:
return (EINVAL);
}
- err = usbd_set_report(sc->sc_iface, re->report, id, re->data,
+ err = usbd_set_report(sc->sc_iface, re->ucr_report, id,
+ re->ucr_data,
size);
if (err)
return (EIO);