diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 18:48:57 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-28 18:48:57 -0400 |
commit | 596c96ba06e5d56e72451e02f93f4e15e17458df (patch) | |
tree | 78bc640acacb8faeb621c51296e99dbb0533a147 /drivers/usb/core | |
parent | ad18b0ea089928367185e13d11424aea91d4b41f (diff) | |
parent | 20731945ae743034353a88c307920d1f16cf8ac8 (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/devio.c | 2 | ||||
-rw-r--r-- | drivers/usb/core/file.c | 4 | ||||
-rw-r--r-- | drivers/usb/core/hcd.c | 3 | ||||
-rw-r--r-- | drivers/usb/core/hub.c | 16 |
4 files changed, 15 insertions, 10 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 487ff672b104..befe0c7f63d1 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c | |||
@@ -1509,7 +1509,7 @@ void usbdev_add(struct usb_device *dev) | |||
1509 | { | 1509 | { |
1510 | int minor = ((dev->bus->busnum-1) * 128) + (dev->devnum-1); | 1510 | int minor = ((dev->bus->busnum-1) * 128) + (dev->devnum-1); |
1511 | 1511 | ||
1512 | dev->class_dev = class_device_create(usb_device_class, | 1512 | dev->class_dev = class_device_create(usb_device_class, NULL, |
1513 | MKDEV(USB_DEVICE_MAJOR, minor), &dev->dev, | 1513 | MKDEV(USB_DEVICE_MAJOR, minor), &dev->dev, |
1514 | "usbdev%d.%d", dev->bus->busnum, dev->devnum); | 1514 | "usbdev%d.%d", dev->bus->busnum, dev->devnum); |
1515 | 1515 | ||
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c index 65ca131cc44c..78cb4be9529f 100644 --- a/drivers/usb/core/file.c +++ b/drivers/usb/core/file.c | |||
@@ -172,7 +172,9 @@ int usb_register_dev(struct usb_interface *intf, | |||
172 | ++temp; | 172 | ++temp; |
173 | else | 173 | else |
174 | temp = name; | 174 | temp = name; |
175 | intf->class_dev = class_device_create(usb_class, MKDEV(USB_MAJOR, minor), &intf->dev, "%s", temp); | 175 | intf->class_dev = class_device_create(usb_class, NULL, |
176 | MKDEV(USB_MAJOR, minor), | ||
177 | &intf->dev, "%s", temp); | ||
176 | if (IS_ERR(intf->class_dev)) { | 178 | if (IS_ERR(intf->class_dev)) { |
177 | spin_lock (&minor_lock); | 179 | spin_lock (&minor_lock); |
178 | usb_minors[intf->minor] = NULL; | 180 | usb_minors[intf->minor] = NULL; |
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index ff19d64041b5..14c47a10da86 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -782,7 +782,8 @@ static int usb_register_bus(struct usb_bus *bus) | |||
782 | return -E2BIG; | 782 | return -E2BIG; |
783 | } | 783 | } |
784 | 784 | ||
785 | bus->class_dev = class_device_create(usb_host_class, MKDEV(0,0), bus->controller, "usb_host%d", busnum); | 785 | bus->class_dev = class_device_create(usb_host_class, NULL, MKDEV(0,0), |
786 | bus->controller, "usb_host%d", busnum); | ||
786 | if (IS_ERR(bus->class_dev)) { | 787 | if (IS_ERR(bus->class_dev)) { |
787 | clear_bit(busnum, busmap.busmap); | 788 | clear_bit(busnum, busmap.busmap); |
788 | up(&usb_bus_list_lock); | 789 | up(&usb_bus_list_lock); |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index a12cab5314e9..c3e2024c4347 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -1020,9 +1020,15 @@ void usb_set_device_state(struct usb_device *udev, | |||
1020 | spin_lock_irqsave(&device_state_lock, flags); | 1020 | spin_lock_irqsave(&device_state_lock, flags); |
1021 | if (udev->state == USB_STATE_NOTATTACHED) | 1021 | if (udev->state == USB_STATE_NOTATTACHED) |
1022 | ; /* do nothing */ | 1022 | ; /* do nothing */ |
1023 | else if (new_state != USB_STATE_NOTATTACHED) | 1023 | else if (new_state != USB_STATE_NOTATTACHED) { |
1024 | udev->state = new_state; | 1024 | udev->state = new_state; |
1025 | else | 1025 | if (new_state == USB_STATE_CONFIGURED) |
1026 | device_init_wakeup(&udev->dev, | ||
1027 | (udev->actconfig->desc.bmAttributes | ||
1028 | & USB_CONFIG_ATT_WAKEUP)); | ||
1029 | else if (new_state != USB_STATE_SUSPENDED) | ||
1030 | device_init_wakeup(&udev->dev, 0); | ||
1031 | } else | ||
1026 | recursively_mark_NOTATTACHED(udev); | 1032 | recursively_mark_NOTATTACHED(udev); |
1027 | spin_unlock_irqrestore(&device_state_lock, flags); | 1033 | spin_unlock_irqrestore(&device_state_lock, flags); |
1028 | } | 1034 | } |
@@ -1546,11 +1552,7 @@ static int hub_port_suspend(struct usb_hub *hub, int port1, | |||
1546 | * NOTE: OTG devices may issue remote wakeup (or SRP) even when | 1552 | * NOTE: OTG devices may issue remote wakeup (or SRP) even when |
1547 | * we don't explicitly enable it here. | 1553 | * we don't explicitly enable it here. |
1548 | */ | 1554 | */ |
1549 | if (udev->actconfig | 1555 | if (device_may_wakeup(&udev->dev)) { |
1550 | // && FIXME (remote wakeup enabled on this bus) | ||
1551 | // ... currently assuming it's always appropriate | ||
1552 | && (udev->actconfig->desc.bmAttributes | ||
1553 | & USB_CONFIG_ATT_WAKEUP) != 0) { | ||
1554 | status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | 1556 | status = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), |
1555 | USB_REQ_SET_FEATURE, USB_RECIP_DEVICE, | 1557 | USB_REQ_SET_FEATURE, USB_RECIP_DEVICE, |
1556 | USB_DEVICE_REMOTE_WAKEUP, 0, | 1558 | USB_DEVICE_REMOTE_WAKEUP, 0, |