From cbd30dee28ea9c348eda811275b088898dd9724b Mon Sep 17 00:00:00 2001 From: alfred Date: Mon, 2 Feb 2009 00:49:39 +0000 Subject: src/usr.bin/usbhidaction/usbhidaction.c src/usr.bin/usbhidctl/usbhid.c src/sys/dev/usb2/include/usb2_hid.h src/sys/dev/usb2/input/uhid2.c src/lib/libusbhid/Makefile src/lib/libusbhid/descr.c src/lib/libusbhid/descr_compat.c src/lib/libusbhid/usbhid.3 src/lib/libusbhid/usbhid.h src/lib/libusbhid/usbvar.h Patches to make libusbhid and HID userland utilities compatible with the new USB stack. All HID ioctls should go through the libusbhid library to ensure compatibility. I have found at least one piece of software in /usr/ports which needs to get updated before USB HID devices will work. This is the X joystick input driver. Reported and tested by: Daichi GOTO and Masanori OZAWA. src/sys/dev/usb2/core/usb2_process.c Correct USB process names. Reported by: Andre Guibert de Bruet src/sys/dev/usb2/serial/uftdi2.c Integrate changes from old USB stack. Submitted by: hps --- usr.bin/usbhidaction/usbhidaction.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'usr.bin/usbhidaction/usbhidaction.c') diff --git a/usr.bin/usbhidaction/usbhidaction.c b/usr.bin/usbhidaction/usbhidaction.c index e0d459d..a3aa3c5 100644 --- a/usr.bin/usbhidaction/usbhidaction.c +++ b/usr.bin/usbhidaction/usbhidaction.c @@ -46,9 +46,7 @@ #include #include #include -#include -#include -#include +#include #include #include #include @@ -155,8 +153,7 @@ main(int argc, char **argv) fd = open(dev, O_RDWR); if (fd < 0) err(1, "%s", dev); - if (ioctl(fd, USB_GET_REPORT_ID, &reportid) < 0) - reportid = -1; + reportid = hid_get_report_id(fd); repd = hid_get_report_desc(fd); if (repd == NULL) err(1, "hid_get_report_desc() failed"); -- cgit v1.1