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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e1879b19b0
commit
70a1c9e086
@@ -794,8 +794,6 @@ static int usb_suspend_device(struct usb_device *udev, pm_message_t msg)
|
||||
|
||||
done:
|
||||
dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status);
|
||||
if (status == 0)
|
||||
udev->dev.power.power_state.event = msg.event;
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -824,10 +822,8 @@ static int usb_resume_device(struct usb_device *udev)
|
||||
|
||||
done:
|
||||
dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status);
|
||||
if (status == 0) {
|
||||
if (status == 0)
|
||||
udev->autoresume_disabled = 0;
|
||||
udev->dev.power.power_state.event = PM_EVENT_ON;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -1180,8 +1176,7 @@ static int usb_resume_both(struct usb_device *udev)
|
||||
}
|
||||
} else {
|
||||
|
||||
/* Needed for setting udev->dev.power.power_state.event,
|
||||
* for possible debugging message, and for reset_resume. */
|
||||
/* Needed for reset-resume */
|
||||
status = usb_resume_device(udev);
|
||||
}
|
||||
|
||||
@@ -1194,7 +1189,8 @@ static int usb_resume_both(struct usb_device *udev)
|
||||
|
||||
done:
|
||||
dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status);
|
||||
udev->reset_resume = 0;
|
||||
if (!status)
|
||||
udev->reset_resume = 0;
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user