diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-30 19:45:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-30 19:45:39 -0400 |
commit | a335750b9a039a9d4cd727cdccacfb90fd63c4e8 (patch) | |
tree | 8f3198984fb75fe494e771d9431f6799228623c5 /drivers/pci | |
parent | 10f3cb41d48ab30f5c754b30eea557371892b4c2 (diff) | |
parent | d326f44e5f2204c7a24db69bfc6dd3fe5f86182b (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull ACPI & Power Management changes from Len Brown:
- ACPI 5.0 after-ripples, ACPICA/Linux divergence cleanup
- cpuidle evolving, more ARM use
- thermal sub-system evolving, ditto
- assorted other PM bits
Fix up conflicts in various cpuidle implementations due to ARM cpuidle
cleanups (ARM at91 self-refresh and cpu idle code rewritten into
"standby" in asm conflicting with the consolidation of cpuidle time
keeping), trivial SH include file context conflict and RCU tracing fixes
in generic code.
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (77 commits)
ACPI throttling: fix endian bug in acpi_read_throttling_status()
Disable MCP limit exceeded messages from Intel IPS driver
ACPI video: Don't start video device until its associated input device has been allocated
ACPI video: Harden video bus adding.
ACPI: Add support for exposing BGRT data
ACPI: export acpi_kobj
ACPI: Fix logic for removing mappings in 'acpi_unmap'
CPER failed to handle generic error records with multiple sections
ACPI: Clean redundant codes in scan.c
ACPI: Fix unprotected smp_processor_id() in acpi_processor_cst_has_changed()
ACPI: consistently use should_use_kmap()
PNPACPI: Fix device ref leaking in acpi_pnp_match
ACPI: Fix use-after-free in acpi_map_lsapic
ACPI: processor_driver: add missing kfree
ACPI, APEI: Fix incorrect APEI register bit width check and usage
Update documentation for parameter *notrigger* in einj.txt
ACPI, APEI, EINJ, new parameter to control trigger action
ACPI, APEI, EINJ, limit the range of einj_param
ACPI, APEI, Fix ERST header length check
cpuidle: power_usage should be declared signed integer
...
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci-acpi.c | 40 |
1 files changed, 3 insertions, 37 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index 060fd22a1103..0f150f271c2a 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -277,40 +277,6 @@ static int acpi_pci_sleep_wake(struct pci_dev *dev, bool enable) | |||
277 | return 0; | 277 | return 0; |
278 | } | 278 | } |
279 | 279 | ||
280 | /** | ||
281 | * acpi_dev_run_wake - Enable/disable wake-up for given device. | ||
282 | * @phys_dev: Device to enable/disable the platform to wake-up the system for. | ||
283 | * @enable: Whether enable or disable the wake-up functionality. | ||
284 | * | ||
285 | * Find the ACPI device object corresponding to @pci_dev and try to | ||
286 | * enable/disable the GPE associated with it. | ||
287 | */ | ||
288 | static int acpi_dev_run_wake(struct device *phys_dev, bool enable) | ||
289 | { | ||
290 | struct acpi_device *dev; | ||
291 | acpi_handle handle; | ||
292 | |||
293 | if (!device_run_wake(phys_dev)) | ||
294 | return -EINVAL; | ||
295 | |||
296 | handle = DEVICE_ACPI_HANDLE(phys_dev); | ||
297 | if (!handle || ACPI_FAILURE(acpi_bus_get_device(handle, &dev))) { | ||
298 | dev_dbg(phys_dev, "ACPI handle has no context in %s!\n", | ||
299 | __func__); | ||
300 | return -ENODEV; | ||
301 | } | ||
302 | |||
303 | if (enable) { | ||
304 | acpi_enable_wakeup_device_power(dev, ACPI_STATE_S0); | ||
305 | acpi_enable_gpe(dev->wakeup.gpe_device, dev->wakeup.gpe_number); | ||
306 | } else { | ||
307 | acpi_disable_gpe(dev->wakeup.gpe_device, dev->wakeup.gpe_number); | ||
308 | acpi_disable_wakeup_device_power(dev); | ||
309 | } | ||
310 | |||
311 | return 0; | ||
312 | } | ||
313 | |||
314 | static void acpi_pci_propagate_run_wake(struct pci_bus *bus, bool enable) | 280 | static void acpi_pci_propagate_run_wake(struct pci_bus *bus, bool enable) |
315 | { | 281 | { |
316 | while (bus->parent) { | 282 | while (bus->parent) { |
@@ -318,14 +284,14 @@ static void acpi_pci_propagate_run_wake(struct pci_bus *bus, bool enable) | |||
318 | 284 | ||
319 | if (bridge->pme_interrupt) | 285 | if (bridge->pme_interrupt) |
320 | return; | 286 | return; |
321 | if (!acpi_dev_run_wake(&bridge->dev, enable)) | 287 | if (!acpi_pm_device_run_wake(&bridge->dev, enable)) |
322 | return; | 288 | return; |
323 | bus = bus->parent; | 289 | bus = bus->parent; |
324 | } | 290 | } |
325 | 291 | ||
326 | /* We have reached the root bus. */ | 292 | /* We have reached the root bus. */ |
327 | if (bus->bridge) | 293 | if (bus->bridge) |
328 | acpi_dev_run_wake(bus->bridge, enable); | 294 | acpi_pm_device_run_wake(bus->bridge, enable); |
329 | } | 295 | } |
330 | 296 | ||
331 | static int acpi_pci_run_wake(struct pci_dev *dev, bool enable) | 297 | static int acpi_pci_run_wake(struct pci_dev *dev, bool enable) |
@@ -333,7 +299,7 @@ static int acpi_pci_run_wake(struct pci_dev *dev, bool enable) | |||
333 | if (dev->pme_interrupt) | 299 | if (dev->pme_interrupt) |
334 | return 0; | 300 | return 0; |
335 | 301 | ||
336 | if (!acpi_dev_run_wake(&dev->dev, enable)) | 302 | if (!acpi_pm_device_run_wake(&dev->dev, enable)) |
337 | return 0; | 303 | return 0; |
338 | 304 | ||
339 | acpi_pci_propagate_run_wake(dev->bus, enable); | 305 | acpi_pci_propagate_run_wake(dev->bus, enable); |