]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: rework pci_set_power_state function to call platform first
authorRafael J. Wysocki <rjw@sisk.pl>
Mon, 7 Jul 2008 01:32:52 +0000 (03:32 +0200)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 7 Jul 2008 23:25:43 +0000 (16:25 -0700)
commit6c8a36a76024a9e96bbda4b4cd87e495a0c235ca
tree27c32f382f7af839733cbdc5dedf4fc979708a05
parent71900c5fdb9a72523455f54a0cbe048d5db15de8
PCI: rework pci_set_power_state function to call platform first

Rework pci_set_power_state() so that the platform callback is
invoked before the native mechanism, if necessary.  Also, make
the function check if the device is power manageable by the
platform before invoking the platform callback.

This may matter if the device dependent on additional power
resources controlled by the platform is being put into D0, in which
case those power resources must be turned on before we attempt to
handle the device itself.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pci-acpi.c
drivers/pci/pci.c