]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
PCI / ACPI / PM: Use correct power state strings in messages
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 13 Jun 2013 22:29:50 +0000 (00:29 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 14 Jun 2013 22:35:42 +0000 (16:35 -0600)
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>
drivers/pci/pci-acpi.c

index 6c15d6a969355229131635dca0ba034cfcb0fe28..dbdc5f7e2b294fad4adfe3ae676e258c5af6abbe 100644 (file)
@@ -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;
 }