Move malloc definitions to usb.h.
Also, remove usb_malloc_type: it was unused. Remove METHODS_NONE: it was unused. Move include of opt_usb.h from usb_port.h to usb.h, since usb_port.h is going away (there will be a usb_compat.h for out-of-tree drivers that want it).
This commit is contained in:
parent
7a855803b9
commit
058cc61a3e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170727
@ -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 */
|
||||
|
@ -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 \
|
||||
|
Loading…
Reference in New Issue
Block a user