summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>1999-06-01 07:22:01 +0000
committern_hibma <n_hibma@FreeBSD.org>1999-06-01 07:22:01 +0000
commit327b9c7ba334e7fe6cc93086bd750078d56f73fa (patch)
tree70ee63b21399841d479ee826e0af473f9b2f19c1 /sys
parentff89b648a61d1c6395bd3371ea371da64ad79f6c (diff)
downloadFreeBSD-src-327b9c7ba334e7fe6cc93086bd750078d56f73fa.zip
FreeBSD-src-327b9c7ba334e7fe6cc93086bd750078d56f73fa.tar.gz
USB stopped working as of the recent cdevsw cleanup. This fixes that.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/usb.c2
-rw-r--r--sys/dev/usb/usbdi.c7
-rw-r--r--sys/dev/usb/usbdi.h6
3 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index 3119ca9..9165a4f 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -129,7 +129,7 @@ struct cdevsw usb_cdevsw = {
/* strategy */ nostrategy,
/* name */ "usb",
/* parms */ noparms,
- /* maj */ -1,
+ /* maj */ USB_CDEV_MAJOR,
/* dump */ nodump,
/* psize */ nopsize,
/* flags */ 0,
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c
index 52497e5..c827f2f 100644
--- a/sys/dev/usb/usbdi.c
+++ b/sys/dev/usb/usbdi.c
@@ -80,12 +80,6 @@ void usbd_do_request_async_cb
static SIMPLEQ_HEAD(, usbd_request) usbd_free_requests;
-#if defined(__FreeBSD__)
-#define USB_CDEV_MAJOR 108
-
-extern struct cdevsw usb_cdevsw;
-#endif
-
#ifdef USB_DEBUG
char *usbd_error_strs[USBD_ERROR_MAX] = {
"NORMAL_COMPLETION",
@@ -374,6 +368,7 @@ usbd_get_request_status(reqh, priv, buffer, count, status)
*count = reqh->actlen;
if (status)
*status = reqh->status;
+
return (USBD_NORMAL_COMPLETION);
}
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h
index 9db866b..bcf36d5 100644
--- a/sys/dev/usb/usbdi.h
+++ b/sys/dev/usb/usbdi.h
@@ -115,6 +115,12 @@ typedef void (*usbd_callback) __P((usbd_request_handle, usbd_private_handle,
#define USBD_NO_TIMEOUT 0
#define USBD_DEFAULT_TIMEOUT 5000 /* ms = 5 s */
+#if defined(__FreeBSD__)
+#define USB_CDEV_MAJOR 108
+
+extern struct cdevsw usb_cdevsw;
+#endif
+
usbd_status usbd_open_pipe
__P((usbd_interface_handle iface, u_int8_t address,
u_int8_t flags, usbd_pipe_handle *pipe));
OpenPOWER on IntegriCloud