diff options
-rw-r--r-- | etc/mtree/BSD.include.dist | 4 | ||||
-rw-r--r-- | include/Makefile | 2 | ||||
-rw-r--r-- | lib/libusb20/libusb20_ugen20.c | 10 | ||||
-rw-r--r-- | lib/libusbhid/descr.c | 8 | ||||
-rw-r--r-- | lib/libusbhid/descr_compat.c | 2 | ||||
-rw-r--r-- | lib/libusbhid/usbvar.h | 2 | ||||
-rw-r--r-- | share/man/man7/hier.7 | 2 | ||||
-rw-r--r-- | usr.bin/usbhidaction/usbhidaction.c | 2 | ||||
-rw-r--r-- | usr.bin/usbhidctl/usbhid.c | 2 | ||||
-rw-r--r-- | usr.sbin/bluetooth/bcmfw/bcmfw.c | 1 |
10 files changed, 20 insertions, 15 deletions
diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist index 4d2650b..a3dade4 100644 --- a/etc/mtree/BSD.include.dist +++ b/etc/mtree/BSD.include.dist @@ -120,10 +120,6 @@ .. usb .. - usb2 - include - .. - .. utopia .. vkbd diff --git a/include/Makefile b/include/Makefile index d6d0e17..aea958a 100644 --- a/include/Makefile +++ b/include/Makefile @@ -54,7 +54,7 @@ LSUBDIRS= cam/scsi \ security/mac_mls security/mac_partition \ ufs/ffs ufs/ufs -LSUBSUBDIRS= dev/mpt/mpilib dev/usb2/include +LSUBSUBDIRS= dev/mpt/mpilib .if ${MACHINE_ARCH} == "powerpc" _dev_powermac_nvram= dev/powermac_nvram diff --git a/lib/libusb20/libusb20_ugen20.c b/lib/libusb20/libusb20_ugen20.c index c148790..7bfe2ce 100644 --- a/lib/libusb20/libusb20_ugen20.c +++ b/lib/libusb20/libusb20_ugen20.c @@ -39,11 +39,11 @@ #include "libusb20_desc.h" #include "libusb20_int.h" -#include <dev/usb2/include/usb2_standard.h> -#include <dev/usb2/include/usb2_ioctl.h> -#include <dev/usb2/include/usb2_mfunc.h> -#include <dev/usb2/include/usb2_error.h> -#include <dev/usb2/include/usb2_revision.h> +#include <dev/usb/usb.h> +#include <dev/usb/usb_ioctl.h> +#include <dev/usb/usb_mfunc.h> +#include <dev/usb/usb_error.h> +#include <dev/usb/usb_revision.h> static libusb20_init_backend_t ugen20_init_backend; static libusb20_open_device_t ugen20_open_device; 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 diff --git a/lib/libusbhid/descr_compat.c b/lib/libusbhid/descr_compat.c index 3cbcdbf..a38d8d7 100644 --- a/lib/libusbhid/descr_compat.c +++ b/lib/libusbhid/descr_compat.c @@ -28,6 +28,7 @@ * This file contains fallback-compatibility code for the old FreeBSD * USB stack. */ +#ifdef HID_COMPAT7 #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -75,3 +76,4 @@ hid_get_report_desc_compat7(int fd) return (hid_use_report_desc(rep.ucrd_data, (unsigned int)rep.ucrd_size)); } +#endif /* HID_COMPAT7 */ diff --git a/lib/libusbhid/usbvar.h b/lib/libusbhid/usbvar.h index b8fbf37..d437005 100644 --- a/lib/libusbhid/usbvar.h +++ b/lib/libusbhid/usbvar.h @@ -36,6 +36,8 @@ struct report_desc { /* internal backwards compatibility functions */ +#ifdef HID_COMPAT7 int hid_set_immed_compat7(int fd, int enable); int hid_get_report_id_compat7(int fd); report_desc_t hid_get_report_desc_compat7(int fd); +#endif diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index 2ca54b3..40c2d0c 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -232,8 +232,6 @@ see .Xr ppbus 4 .It Pa usb/ The USB subsystem -.It Pa usb2/include -The USB subsystem .It Pa utopia/ Physical chip driver for ATM interfaces; see diff --git a/usr.bin/usbhidaction/usbhidaction.c b/usr.bin/usbhidaction/usbhidaction.c index a3aa3c5..a5e2598 100644 --- a/usr.bin/usbhidaction/usbhidaction.c +++ b/usr.bin/usbhidaction/usbhidaction.c @@ -46,7 +46,7 @@ #include <limits.h> #include <unistd.h> #include <sys/types.h> -#include <dev/usb2/include/usb2_hid.h> +#include <dev/usb/usbhid.h> #include <usbhid.h> #include <syslog.h> #include <signal.h> diff --git a/usr.bin/usbhidctl/usbhid.c b/usr.bin/usbhidctl/usbhid.c index 917666e..601e392 100644 --- a/usr.bin/usbhidctl/usbhid.c +++ b/usr.bin/usbhidctl/usbhid.c @@ -47,7 +47,7 @@ #include <ctype.h> #include <errno.h> #include <usbhid.h> -#include <dev/usb2/include/usb2_hid.h> +#include <dev/usb/usbhid.h> int verbose = 0; int all = 0; diff --git a/usr.sbin/bluetooth/bcmfw/bcmfw.c b/usr.sbin/bluetooth/bcmfw/bcmfw.c index cd4679d..29d9996c 100644 --- a/usr.sbin/bluetooth/bcmfw/bcmfw.c +++ b/usr.sbin/bluetooth/bcmfw/bcmfw.c @@ -35,6 +35,7 @@ #include <sys/types.h> #include <sys/ioctl.h> #include <dev/usb/usb.h> +#include <dev/usb/usb_ioctl.h> #include <errno.h> #include <fcntl.h> #include <netgraph.h> |