提交 fc6504b3 编写于 作者: R Rafael J. Wysocki 提交者: Bjorn Helgaas

PCI / ACPI / PM: Use correct power state strings in messages

Make acpi_pci_set_power_state() print the name of the ACPI device
power state the device has been actually put into instead of printing
the name of the requested PCI device power state, which need not be
the same.

[bhelgaas: use ACPI_STATE_D3_COLD (ACPI_STATE_D3 == ACPI_STATE_D3_COLD)]
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 bd0c5024
......@@ -186,8 +186,8 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
[PCI_D0] = ACPI_STATE_D0,
[PCI_D1] = ACPI_STATE_D1,
[PCI_D2] = ACPI_STATE_D2,
[PCI_D3hot] = ACPI_STATE_D3,
[PCI_D3cold] = ACPI_STATE_D3
[PCI_D3hot] = ACPI_STATE_D3_COLD,
[PCI_D3cold] = ACPI_STATE_D3_COLD,
};
int error = -EINVAL;
......@@ -211,7 +211,7 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state)
if (!error)
dev_info(&dev->dev, "power state changed by ACPI to %s\n",
pci_power_name(state));
acpi_power_state_string(state_conv[state]));
return error;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册