Diff for /src/sys/bus/usb/uhub.c between versions 1.4 and 1.5

version 1.4, 2003/12/30 01:01:44 version 1.5, 2004/02/11 15:17:26
Line 52 Line 52
 #if defined(__NetBSD__) || defined(__OpenBSD__)  #if defined(__NetBSD__) || defined(__OpenBSD__)
 #include <sys/device.h>  #include <sys/device.h>
 #include <sys/proc.h>  #include <sys/proc.h>
#elif defined(__FreeBSD__)#elif defined(__FreeBSD__) || defined(__DragonFly__)
 #include <sys/module.h>  #include <sys/module.h>
 #include <sys/bus.h>  #include <sys/bus.h>
 #include "bus_if.h"  #include "bus_if.h"
Line 91  struct uhub_softc { Line 91  struct uhub_softc {
 Static usbd_status uhub_explore(usbd_device_handle hub);  Static usbd_status uhub_explore(usbd_device_handle hub);
 Static void uhub_intr(usbd_xfer_handle, usbd_private_handle,usbd_status);  Static void uhub_intr(usbd_xfer_handle, usbd_private_handle,usbd_status);
   
#if defined(__FreeBSD__)#if defined(__FreeBSD__) || defined(__DragonFly__)
 Static bus_driver_added_t uhub_driver_added;  Static bus_driver_added_t uhub_driver_added;
 Static bus_child_detached_t uhub_child_detached;  Static bus_child_detached_t uhub_child_detached;
 #endif  #endif
Line 109  USB_DECLARE_DRIVER(uhub); Line 109  USB_DECLARE_DRIVER(uhub);
 /* Create the driver instance for the hub connected to hub case */  /* Create the driver instance for the hub connected to hub case */
 CFATTACH_DECL(uhub_uhub, sizeof(struct uhub_softc),  CFATTACH_DECL(uhub_uhub, sizeof(struct uhub_softc),
     uhub_match, uhub_attach, uhub_detach, uhub_activate);      uhub_match, uhub_attach, uhub_detach, uhub_activate);
#elif defined(__FreeBSD__)#elif defined(__FreeBSD__) || defined(__DragonFly__)
 USB_DECLARE_DRIVER_INIT(uhub,  USB_DECLARE_DRIVER_INIT(uhub,
                         DEVMETHOD(bus_driver_added, uhub_driver_added),                          DEVMETHOD(bus_driver_added, uhub_driver_added),
                         DEVMETHOD(bus_child_detached, uhub_child_detached),                          DEVMETHOD(bus_child_detached, uhub_child_detached),
Line 549  USB_DETACH(uhub) Line 549  USB_DETACH(uhub)
   
 #if defined(__NetBSD__) || defined(__OpenBSD__)  #if defined(__NetBSD__) || defined(__OpenBSD__)
         DPRINTF(("uhub_detach: sc=%p flags=%d\n", sc, flags));          DPRINTF(("uhub_detach: sc=%p flags=%d\n", sc, flags));
#elif defined(__FreeBSD__)#elif defined(__FreeBSD__) || defined(__DragonFly__)
         DPRINTF(("uhub_detach: sc=%port\n", sc));          DPRINTF(("uhub_detach: sc=%port\n", sc));
 #endif  #endif
   
Line 575  USB_DETACH(uhub) Line 575  USB_DETACH(uhub)
         return (0);          return (0);
 }  }
   
#if defined(__FreeBSD__)#if defined(__FreeBSD__) || defined(__DragonFly__)
 /* Called when a device has been detached from it */  /* Called when a device has been detached from it */
 Static void  Static void
 uhub_child_detached(device_t self, device_t child)  uhub_child_detached(device_t self, device_t child)
Line 638  uhub_intr(usbd_xfer_handle xfer, usbd_pr Line 638  uhub_intr(usbd_xfer_handle xfer, usbd_pr
                 usb_needs_explore(sc->sc_hub);                  usb_needs_explore(sc->sc_hub);
 }  }
   
#if defined(__FreeBSD__)#if defined(__FreeBSD__) || defined(__DragonFly__)
 DRIVER_MODULE(uhub, usb, uhubroot_driver, uhubroot_devclass, 0, 0);  DRIVER_MODULE(uhub, usb, uhubroot_driver, uhubroot_devclass, 0, 0);
 DRIVER_MODULE(uhub, uhub, uhub_driver, uhub_devclass, usbd_driver_load, 0);  DRIVER_MODULE(uhub, uhub, uhub_driver, uhub_devclass, usbd_driver_load, 0);
 #endif  #endif

Removed from v.1.4  
changed lines
  Added in v.1.5