summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/urb.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-07-30 17:08:43 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 14:55:01 -0700
commit4326ed0be93574dac5b5e475713015159108bd88 (patch)
tree9d8ab9c40dc5909267f1c2c68a5e13c81be8e8e0 /drivers/usb/core/urb.c
parent5e60a16139c2a48b9876b0ff910671eee5fb32ec (diff)
downloadlinux-4326ed0be93574dac5b5e475713015159108bd88.tar.gz
linux-4326ed0be93574dac5b5e475713015159108bd88.tar.bz2
linux-4326ed0be93574dac5b5e475713015159108bd88.zip
USB: address-0 handling during device initialization
This patch (as947) changes the device initialization and enumeration code in hub.c; now udev->devnum will be set to 0 while the device is being accessed at address 0. Until now this wasn't needed because the address value was passed as part of urb->pipe; without that field the device address must be stored elsewhere. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/urb.c')
-rw-r--r--drivers/usb/core/urb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index 1a64a6a850f3..1acca8696bcd 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -284,9 +284,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
if (!urb || urb->hcpriv || !urb->complete)
return -EINVAL;
- if (!(dev = urb->dev) ||
- (dev->state < USB_STATE_DEFAULT) ||
- (!dev->bus) || (dev->devnum <= 0))
+ if (!(dev = urb->dev) || dev->state < USB_STATE_DEFAULT)
return -ENODEV;
if (dev->bus->controller->power.power_state.event != PM_EVENT_ON
|| dev->state == USB_STATE_SUSPENDED)