summaryrefslogtreecommitdiffstats
path: root/lib/libusbhid/descr.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-02-23 18:36:54 +0000
committerthompsa <thompsa@FreeBSD.org>2009-02-23 18:36:54 +0000
commit67f51fe4b6588da6a22256d85370d621edce59d2 (patch)
treeb2372a733b5fd6eaae1b2ddf567b80210c8317ff /lib/libusbhid/descr.c
parent6b0018e885dd384f1bb0b0572d672fca70457e1d (diff)
downloadFreeBSD-src-67f51fe4b6588da6a22256d85370d621edce59d2.zip
FreeBSD-src-67f51fe4b6588da6a22256d85370d621edce59d2.tar.gz
Build fixups for the new USB stack.
Diffstat (limited to 'lib/libusbhid/descr.c')
-rw-r--r--lib/libusbhid/descr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libusbhid/descr.c b/lib/libusbhid/descr.c
index cc1737b..0ae383f 100644
--- a/lib/libusbhid/descr.c
+++ b/lib/libusbhid/descr.c
@@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
#include <sys/time.h>
#include <sys/ioctl.h>
-#include <dev/usb2/include/usb2_ioctl.h>
+#include <dev/usb/usb_ioctl.h>
#include "usbhid.h"
#include "usbvar.h"
@@ -49,8 +49,10 @@ hid_set_immed(int fd, int enable)
{
int ret;
ret = ioctl(fd, USB_SET_IMMED, &enable);
+#ifdef HID_COMPAT7
if (ret < 0)
ret = hid_set_immed_compat7(fd, enable);
+#endif
return (ret);
}
@@ -61,9 +63,11 @@ hid_get_report_id(int fd)
int ret;
ret = ioctl(fd, USB_GET_REPORT_ID, &temp);
+#ifdef HID_COMPAT7
if (ret < 0)
ret = hid_get_report_id_compat7(fd);
else
+#endif
ret = temp;
return (ret);
@@ -81,11 +85,13 @@ hid_get_report_desc(int fd)
/* get actual length first */
ugd.ugd_data = NULL;
ugd.ugd_maxlen = 65535;
+#ifdef HID_COMPAT7
if (ioctl(fd, USB_GET_REPORT_DESC, &ugd) < 0) {
/* could not read descriptor */
/* try FreeBSD 7 compat code */
return (hid_get_report_desc_compat7(fd));
}
+#endif
/*
* NOTE: The kernel will return a failure if
OpenPOWER on IntegriCloud