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/driver.c | |
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/driver.c')
-rw-r--r-- | drivers/usb/core/driver.c | 12 |
1 files changed, 4 insertions, 8 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 | ||