Re: [RFC][PATCH 2/2] PM: Remove saved_state from dev_pm_info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 9 Jun 2007, Rafael J. Wysocki wrote:

> From: Rafael J. Wysocki <rjw@xxxxxxx>
> 
> The saved_state member of struct dev_pm_info, defined in include/linux/pm.h, is
> not used anywhere, so it can be removed.

Along the same lines, feature_removal_schedule.txt says that 
dev->power.power_state will be removed next month.  In preparation, 
you could consider removing the prev_state member now.  As far as I 
know, it isn't used for anything other than avoiding resume method 
calls to devices that were already suspended when a system sleep 
began.

I suggest that suspend and resume always be called for every device
during a system sleep transition, regardless of the device's state.  
That will have to done anyway once dev->power.power_state is gone.  
The idea is that drivers should regard these method calls as
notifications that the system is about to go to sleep or has just woken
up, rather than as directives to put their device into a particular
state.

Thus, if a driver knows that its device was already in a low-power
state before the system sleep then it need not respond to a resume
method call by switching the device to a high-power state.  Instead the
driver should be free to take whatever action it thinks is appropriate.
This is already explained in Documentation/power/devices.txt.

Alan Stern

_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux