diff options
author | n_hibma <n_hibma@FreeBSD.org> | 2000-05-08 15:10:05 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 2000-05-08 15:10:05 +0000 |
commit | 0c161a9e39cab294a0c94de21afd04f828db2916 (patch) | |
tree | 6518a86542d789f9ce67696658257fbbe9db9e20 /sys/dev/usb | |
parent | c118e945dbea9cfb3f17f191de75063955027acc (diff) | |
download | FreeBSD-src-0c161a9e39cab294a0c94de21afd04f828db2916.zip FreeBSD-src-0c161a9e39cab294a0c94de21afd04f828db2916.tar.gz |
Use the new and shiny module versioning. This enables you to load the
ums driver (mouse) and get the usb driver at the same time.
This also shows that
MODULE_VERSION(usb, 1);
MODULE_DEPEND(usb, usb, 1, 1, 1);
in the same module in one source file works.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/usb.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/usb_port.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index da3ac32..1a615a1 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -180,6 +180,8 @@ USB_DECLARE_DRIVER_INIT(usb, DEVMETHOD(device_shutdown, bus_generic_shutdown) ); +MODULE_VERSION(usb, 1); + USB_MATCH(usb) { DPRINTF(("usbd_match\n")); diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index f3705ac..fe381ba 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -318,7 +318,9 @@ Static driver_t __CONCAT(dname,_driver) = { \ #dname, \ __CONCAT(dname,_methods), \ sizeof(struct __CONCAT(dname,_softc)) \ -} +}; \ +MODULE_DEPEND(dname, usb, 1, 1, 1) + #define METHODS_NONE {0,0} #define USB_DECLARE_DRIVER(dname) USB_DECLARE_DRIVER_INIT(dname, METHODS_NONE) |