diff options
-rw-r--r-- | drivers/pci/pci-acpi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index 5e866b94bcab..67c63d1f1582 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -271,6 +271,7 @@ static pci_power_t acpi_pci_choose_state(struct pci_dev *pdev, | |||
271 | static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) | 271 | static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) |
272 | { | 272 | { |
273 | acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev); | 273 | acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev); |
274 | acpi_handle tmp; | ||
274 | static int state_conv[] = { | 275 | static int state_conv[] = { |
275 | [0] = 0, | 276 | [0] = 0, |
276 | [1] = 1, | 277 | [1] = 1, |
@@ -282,6 +283,9 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) | |||
282 | 283 | ||
283 | if (!handle) | 284 | if (!handle) |
284 | return -ENODEV; | 285 | return -ENODEV; |
286 | /* If the ACPI device has _EJ0, ignore the device */ | ||
287 | if (ACPI_SUCCESS(acpi_get_handle(handle, "_EJ0", &tmp))) | ||
288 | return 0; | ||
285 | return acpi_bus_set_power(handle, acpi_state); | 289 | return acpi_bus_set_power(handle, acpi_state); |
286 | } | 290 | } |
287 | 291 | ||