diff options
author | n_hibma <n_hibma@FreeBSD.org> | 2000-06-15 13:51:30 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 2000-06-15 13:51:30 +0000 |
commit | 6c65f3af5b06c01193a817a71094b83ba676edb8 (patch) | |
tree | 930fabd6773dd2622b37f1c12624ac6c48bf1163 /sys/dev/usb/usb_port.h | |
parent | 60767a238430f30fde921d33ffe70aa27c7b37b5 (diff) | |
download | FreeBSD-src-6c65f3af5b06c01193a817a71094b83ba676edb8.zip FreeBSD-src-6c65f3af5b06c01193a817a71094b83ba676edb8.tar.gz |
Make the module dependencies actually work.
Specifying 'umass_load="YES"' in /boot/loader.conf or doing a
'kldload umass' now loads usb.ko automagically.
Prodded by: green
Diffstat (limited to 'sys/dev/usb/usb_port.h')
-rw-r--r-- | sys/dev/usb/usb_port.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index 4d706c9..61ac382 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -299,7 +299,7 @@ __CONCAT(dname,_detach)(self, flags) \ #define PWR_RESUME 0 #define PWR_SUSPEND 1 -#define USB_DECLARE_DRIVER_INIT(dname, init...) \ +#define USB_DECLARE_DRIVER_INIT2(dname, init...) \ Static device_probe_t __CONCAT(dname,_match); \ Static device_attach_t __CONCAT(dname,_attach); \ Static device_detach_t __CONCAT(dname,_detach); \ @@ -318,8 +318,17 @@ Static driver_t __CONCAT(dname,_driver) = { \ #dname, \ __CONCAT(dname,_methods), \ sizeof(struct __CONCAT(dname,_softc)) \ -}; \ -MODULE_DEPEND(dname, usb, 1, 1, 1) +} + +#ifdef USBCORE +#define USB_DECLARE_DRIVER_INIT(dname, init...) \ + USB_DECLARE_DRIVER_INIT2(dname, init); \ + MODULE_VERSION(usb, 1) +#else +#define USB_DECLARE_DRIVER_INIT(dname, init...) \ + USB_DECLARE_DRIVER_INIT2(dname, init); \ + MODULE_DEPEND(dname, usb, 1, 1, 1) +#endif #define METHODS_NONE {0,0} #define USB_DECLARE_DRIVER(dname) USB_DECLARE_DRIVER_INIT(dname, METHODS_NONE) |