summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2007-06-14 15:09:21 +0000
committerWarner Losh <imp@FreeBSD.org>2007-06-14 15:09:21 +0000
commit058cc61a3ef6bb26bc6d9a6b8796a0b46faa5e4b (patch)
tree09df2929bdd5cfb540233dab2b19644739f80edc /sys/dev
parent7a855803b9e47b44443361253da7ecbb9a16eaf5 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/usb.h7
-rw-r--r--sys/dev/usb/usb_port.h16
2 files changed, 4 insertions, 19 deletions
diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h
index 2deae80c1998..24c54e99863d 100644
--- a/sys/dev/usb/usb.h
+++ b/sys/dev/usb/usb.h
@@ -45,16 +45,15 @@
#include <sys/types.h>
#include <sys/time.h>
-#if defined(_KERNEL)
-#if 1
#include <dev/usb/usb_port.h>
-#else
+#if defined(_KERNEL)
+#include "opt_usb.h"
+
#include <sys/malloc.h>
MALLOC_DECLARE(M_USB);
MALLOC_DECLARE(M_USBDEV);
MALLOC_DECLARE(M_USBHC);
-#endif
#endif /* _KERNEL */
/* These two defines are used by usbd to autoload the usb kld */
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index 8269c2c21b8d..d92a5880791b 100644
--- a/sys/dev/usb/usb_port.h
+++ b/sys/dev/usb/usb_port.h
@@ -55,17 +55,6 @@
* FreeBSD
*/
-#include "opt_usb.h"
-
-#if defined(_KERNEL)
-#include <sys/malloc.h>
-
-MALLOC_DECLARE(M_USB);
-MALLOC_DECLARE(M_USBDEV);
-MALLOC_DECLARE(M_USBHC);
-
-#endif
-
/* We don't use the soft interrupt code in FreeBSD. */
#if 0
#define USB_USE_SOFTINTR
@@ -85,8 +74,6 @@ typedef struct callout usb_callout_t;
#define PWR_RESUME 0
#define PWR_SUSPEND 1
-typedef struct malloc_type *usb_malloc_type;
-
#define USB_DECLARE_DRIVER_INIT(dname, init...) \
static device_probe_t __CONCAT(dname,_match); \
static device_attach_t __CONCAT(dname,_attach); \
@@ -110,8 +97,7 @@ static driver_t __CONCAT(dname,_driver) = { \
MODULE_DEPEND(dname, usb, 1, 1, 1)
-#define METHODS_NONE {0,0}
-#define USB_DECLARE_DRIVER(dname) USB_DECLARE_DRIVER_INIT(dname, METHODS_NONE)
+#define USB_DECLARE_DRIVER(dname) USB_DECLARE_DRIVER_INIT(dname, {0,0})
#define USB_MATCH(dname) \
static int \