/* if (_PRW at S-state x) choose from highest power _SxD to lowest power _SxW else // no _PRW at S-state x choose highest power _SxD or any lower power  */
static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev)
/* if (_PRW at S-state x) choose from highest power _SxD to lowest power _SxW else // no _PRW at S-state x choose highest power _SxD or any lower power  */
static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev)
{
	int acpi_state;
	acpi_state = acpi_pm_device_sleep_state(&pdev->dev, NULL);
	if (acpi_state < 0)
		return PCI_POWER_ERROR;
	switch (acpi_state) {
	case ACPI_STATE_D0:
		return PCI_D0;
	case ACPI_STATE_D1:
		return PCI_D1;
	case ACPI_STATE_D2:
		return PCI_D2;
	case ACPI_STATE_D3:
		return PCI_D3hot;
	}
	return PCI_POWER_ERROR;
}