Signed-off-by: Inaky Perez-Gonzalez <[EMAIL PROTECTED]>

---
 drivers/usb/core/usb.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

Index: linux.hg/drivers/usb/core/usb.c
===================================================================
--- linux.hg.orig/drivers/usb/core/usb.c        2007-07-09 14:16:36.000000000 
-0700
+++ linux.hg/drivers/usb/core/usb.c     2007-07-09 14:16:39.000000000 -0700
@@ -223,6 +223,15 @@
 
 #endif /* CONFIG_PM */
 
+
+/* Returns 1 if @usb_bus is WUSB, 0 otherwise */
+static unsigned usb_bus_is_wusb(struct usb_bus *bus)
+{
+       struct usb_hcd *hcd = container_of(bus, struct usb_hcd, self);
+       return hcd->wireless;
+}
+
+
 /**
  * usb_alloc_dev - usb device constructor (usbcore-internal)
  * @parent: hub to which device is connected; null to allocate a root hub
@@ -239,6 +248,7 @@
 usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus, unsigned port1)
 {
        struct usb_device *dev;
+       struct usb_hcd *usb_hcd = container_of(bus, struct usb_hcd, self);
 
        dev = kzalloc(sizeof(*dev), GFP_KERNEL);
        if (!dev)
@@ -300,6 +310,8 @@
        INIT_DELAYED_WORK(&dev->autosuspend, usb_autosuspend_work);
        dev->autosuspend_delay = usb_autosuspend_delay * HZ;
 #endif
+       dev->authorized = usb_hcd->authorized_default;
+       dev->wusb = usb_bus_is_wusb(bus)? 1 : 0;
        return dev;
 }
 

--

Inaky

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to