diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2008-03-06 17:00:58 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-25 00:16:41 -0400 |
commit | 70a1c9e086c2e267fbc4533cb870f34999b531d6 (patch) | |
tree | f599883bdc2f04d4ca4760dfdb1f1131fa6b7060 /drivers/usb/core | |
parent | e1879b19b0abdb387e4aeb0b935a486cc75042fb (diff) |
USB: remove dev->power.power_state
power.power_state is scheduled for removal. This patch (as1053)
removes all uses of that field from drivers/usb. Almost all of them
were write-only, the most significant exceptions being sl811-hcd.c and
u132-hcd.c.
Part of this patch was written by Pavel Machek.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/driver.c | 12 | ||||
-rw-r--r-- | drivers/usb/core/hcd-pci.c | 5 | ||||
-rw-r--r-- | drivers/usb/core/usb.h | 2 |
3 files changed, 4 insertions, 15 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index ebccdefcc6f2..2ea333a43d65 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c | |||
@@ -794,8 +794,6 @@ static int usb_suspend_device(struct usb_device *udev, pm_message_t msg) | |||
794 | 794 | ||
795 | done: | 795 | done: |
796 | dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status); | 796 | dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status); |
797 | if (status == 0) | ||
798 | udev->dev.power.power_state.event = msg.event; | ||
799 | return status; | 797 | return status; |
800 | } | 798 | } |
801 | 799 | ||
@@ -824,10 +822,8 @@ static int usb_resume_device(struct usb_device *udev) | |||
824 | 822 | ||
825 | done: | 823 | done: |
826 | dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status); | 824 | dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status); |
827 | if (status == 0) { | 825 | if (status == 0) |
828 | udev->autoresume_disabled = 0; | 826 | udev->autoresume_disabled = 0; |
829 | udev->dev.power.power_state.event = PM_EVENT_ON; | ||
830 | } | ||
831 | return status; | 827 | return status; |
832 | } | 828 | } |
833 | 829 | ||
@@ -1180,8 +1176,7 @@ static int usb_resume_both(struct usb_device *udev) | |||
1180 | } | 1176 | } |
1181 | } else { | 1177 | } else { |
1182 | 1178 | ||
1183 | /* Needed for setting udev->dev.power.power_state.event, | 1179 | /* Needed for reset-resume */ |
1184 | * for possible debugging message, and for reset_resume. */ | ||
1185 | status = usb_resume_device(udev); | 1180 | status = usb_resume_device(udev); |
1186 | } | 1181 | } |
1187 | 1182 | ||
@@ -1194,7 +1189,8 @@ static int usb_resume_both(struct usb_device *udev) | |||
1194 | 1189 | ||
1195 | done: | 1190 | done: |
1196 | dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status); | 1191 | dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status); |
1197 | udev->reset_resume = 0; | 1192 | if (!status) |
1193 | udev->reset_resume = 0; | ||
1198 | return status; | 1194 | return status; |
1199 | } | 1195 | } |
1200 | 1196 | ||
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 84760ddbc332..739407bb8492 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c | |||
@@ -73,7 +73,6 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
73 | if (pci_enable_device(dev) < 0) | 73 | if (pci_enable_device(dev) < 0) |
74 | return -ENODEV; | 74 | return -ENODEV; |
75 | dev->current_state = PCI_D0; | 75 | dev->current_state = PCI_D0; |
76 | dev->dev.power.power_state = PMSG_ON; | ||
77 | 76 | ||
78 | if (!dev->irq) { | 77 | if (!dev->irq) { |
79 | dev_err(&dev->dev, | 78 | dev_err(&dev->dev, |
@@ -302,8 +301,6 @@ int usb_hcd_pci_suspend(struct pci_dev *dev, pm_message_t message) | |||
302 | 301 | ||
303 | done: | 302 | done: |
304 | if (retval == 0) { | 303 | if (retval == 0) { |
305 | dev->dev.power.power_state = PMSG_SUSPEND; | ||
306 | |||
307 | #ifdef CONFIG_PPC_PMAC | 304 | #ifdef CONFIG_PPC_PMAC |
308 | /* Disable ASIC clocks for USB */ | 305 | /* Disable ASIC clocks for USB */ |
309 | if (machine_is(powermac)) { | 306 | if (machine_is(powermac)) { |
@@ -406,8 +403,6 @@ int usb_hcd_pci_resume(struct pci_dev *dev) | |||
406 | pci_set_master(dev); | 403 | pci_set_master(dev); |
407 | pci_restore_state(dev); | 404 | pci_restore_state(dev); |
408 | 405 | ||
409 | dev->dev.power.power_state = PMSG_ON; | ||
410 | |||
411 | clear_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); | 406 | clear_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); |
412 | 407 | ||
413 | if (hcd->driver->resume) { | 408 | if (hcd->driver->resume) { |
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 2375194a9d43..1bf8ccb9c58d 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h | |||
@@ -114,13 +114,11 @@ static inline int is_usb_device_driver(struct device_driver *drv) | |||
114 | static inline void mark_active(struct usb_interface *f) | 114 | static inline void mark_active(struct usb_interface *f) |
115 | { | 115 | { |
116 | f->is_active = 1; | 116 | f->is_active = 1; |
117 | f->dev.power.power_state.event = PM_EVENT_ON; | ||
118 | } | 117 | } |
119 | 118 | ||
120 | static inline void mark_quiesced(struct usb_interface *f) | 119 | static inline void mark_quiesced(struct usb_interface *f) |
121 | { | 120 | { |
122 | f->is_active = 0; | 121 | f->is_active = 0; |
123 | f->dev.power.power_state.event = PM_EVENT_SUSPEND; | ||
124 | } | 122 | } |
125 | 123 | ||
126 | static inline int is_active(const struct usb_interface *f) | 124 | static inline int is_active(const struct usb_interface *f) |