PCI ASPM: cleanup clkpm checks
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Wed, 13 May 2009 03:20:10 +0000 (12:20 +0900)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 18 Jun 2009 21:02:19 +0000 (14:02 -0700)
commit430842e29d396928989c0a45e05025e988004d79
treeecdfed05c82324784fabf42f5f008efa1d3c6dc5
parentf7ea3d7fc03753b08e267fece19c56383e6b856f
PCI ASPM: cleanup clkpm checks

In the current ASPM implementation, callers of pcie_set_clock_pm() check
Clock PM capability of the link or current Clock PM state of the link.
This check should be done in pcie_set_clock_pm() itself.

This patch moves those checks into pcie_set_clock_pm(). It also
introduces pcie_set_clkpm_nocheck() that is equivalent to old
pcie_set_clock_pm(), for the caller who wants to change Clocl PM state
regardless of the Clock PM capability or current Clock PM state. In
addition, this patch changes the function name from
pcie_set_clock_pm() to pcie_set_clkpm() for consistency.

Acked-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pcie/aspm.c