===================================================================
@@ -1128,9 +1128,7 @@ void pci_update_current_state(struct pci
*/
void pci_refresh_power_state(struct pci_dev *dev)
{
- if (acpi_pci_power_manageable(dev))
- acpi_pci_refresh_power_state(dev);
-
+ acpi_pci_refresh_power_state(dev);
pci_update_current_state(dev, dev->current_state);
}
@@ -1143,14 +1141,10 @@ int pci_platform_power_transition(struct
{
int error;
- if (acpi_pci_power_manageable(dev)) {
- error = acpi_pci_set_power_state(dev, state);
- if (!error)
- pci_update_current_state(dev, state);
- } else
- error = -ENODEV;
-
- if (error && !dev->pm_cap) /* Fall back to PCI_D0 */
+ error = acpi_pci_set_power_state(dev, state);
+ if (!error)
+ pci_update_current_state(dev, state);
+ else if (!dev->pm_cap) /* Fall back to PCI_D0 */
dev->current_state = PCI_D0;
return error;
===================================================================
@@ -969,9 +969,7 @@ bool acpi_pci_power_manageable(struct pc
{
struct acpi_device *adev = ACPI_COMPANION(&dev->dev);
- if (!adev)
- return false;
- return acpi_device_power_manageable(adev);
+ return adev && acpi_device_power_manageable(adev);
}
bool acpi_pci_bridge_d3(struct pci_dev *dev)