summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uhub.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2004-08-14 22:10:26 +0000
committerWarner Losh <imp@FreeBSD.org>2004-08-14 22:10:26 +0000
commit487d427700ec4c0109fd675dc6b06d0908422dce (patch)
tree9b99e9bea5a7c62b7a26bf54ee02ab0537c960ee /sys/dev/usb/uhub.c
parent83e76ab9e34bd26f8d71f906d524d350f462b5de (diff)
Notes
Diffstat (limited to 'sys/dev/usb/uhub.c')
-rw-r--r--sys/dev/usb/uhub.c40
1 files changed, 14 insertions, 26 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index d4f68336294d..2e99a1fbdd92 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -90,10 +90,9 @@ Static usbd_status uhub_explore(usbd_device_handle hub);
Static void uhub_intr(usbd_xfer_handle, usbd_private_handle,usbd_status);
#if defined(__FreeBSD__)
-Static bus_driver_added_t uhub_driver_added;
Static bus_child_detached_t uhub_child_detached;
-int uhub_child_location_str(device_t, device_t, char*, size_t);
-int uhub_child_pnpinfo_str(device_t, device_t, char*, size_t);
+Static bus_child_location_str_t uhub_child_location_str;
+Static bus_child_pnpinfo_str_t uhub_child_pnpinfo_str;
#endif
@@ -111,25 +110,26 @@ CFATTACH_DECL(uhub_uhub, sizeof(struct uhub_softc),
uhub_match, uhub_attach, uhub_detach, uhub_activate);
#elif defined(__FreeBSD__)
USB_DECLARE_DRIVER_INIT(uhub,
- DEVMETHOD(bus_driver_added, uhub_driver_added),
- DEVMETHOD(bus_child_detached, uhub_child_detached),
- DEVMETHOD(bus_child_pnpinfo_str, uhub_child_pnpinfo_str),
- DEVMETHOD(bus_child_location_str, uhub_child_location_str),
- DEVMETHOD(device_suspend, bus_generic_suspend),
- DEVMETHOD(device_resume, bus_generic_resume),
- DEVMETHOD(device_shutdown, bus_generic_shutdown)
- );
+ DEVMETHOD(bus_child_detached, uhub_child_detached),
+ DEVMETHOD(bus_child_pnpinfo_str, uhub_child_pnpinfo_str),
+ DEVMETHOD(bus_child_location_str, uhub_child_location_str),
+ DEVMETHOD(bus_driver_added, bus_generic_driver_added),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown)
+ );
/* Create the driver instance for the hub connected to usb case. */
devclass_t uhubroot_devclass;
Static device_method_t uhubroot_methods[] = {
DEVMETHOD(bus_child_detached, uhub_child_detached),
- DEVMETHOD(device_probe, uhub_match),
- DEVMETHOD(device_attach, uhub_attach),
- DEVMETHOD(bus_child_pnpinfo_str, uhub_child_pnpinfo_str),
DEVMETHOD(bus_child_location_str, uhub_child_location_str),
+ DEVMETHOD(bus_child_pnpinfo_str, uhub_child_pnpinfo_str),
+ DEVMETHOD(bus_driver_added, bus_generic_driver_added),
+ DEVMETHOD(device_probe, uhub_match),
+ DEVMETHOD(device_attach, uhub_attach),
DEVMETHOD(device_detach, uhub_detach),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
@@ -714,18 +714,6 @@ uhub_child_detached(device_t self, device_t child)
}
}
}
-
-Static void
-uhub_driver_added(device_t _dev, driver_t *_driver)
-{
- /*
- * Don't do anything, as reprobing does not work currently.
- * In the future we should properly allocate ivars so we can
- * leave the devices attached to the newbus tree. Once we do
- * that, then we can reprobe on driver loading with the
- * default driver added routines.
- */
-}
#endif