Skip to content

Commit

Permalink
PCI / ACPI / PM: Use correct power state strings in messages
Browse files Browse the repository at this point in the history
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: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
Rafael J. Wysocki authored and Bjorn Helgaas committed Jun 14, 2013
1 parent bd0c502 commit fc6504b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/pci/pci-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}
Expand Down

0 comments on commit fc6504b

Please sign in to comment.