diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h index 2deae80c199..24c54e99863 100644 --- a/sys/dev/usb/usb.h +++ b/sys/dev/usb/usb.h @@ -45,16 +45,15 @@ #include #include -#if defined(_KERNEL) -#if 1 #include -#else +#if defined(_KERNEL) +#include "opt_usb.h" + #include 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 8269c2c21b8..d92a5880791 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 - -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 \