linux/drivers/pnp
Rafael J. Wysocki cc8e7a355c PNP / ACPI: Use DEVICE_ACPI_HANDLE() for device ACPI handle access
The PNP ACPI driver squirrels the ACPI handles of PNP devices' ACPI
companions, but this isn't correct, because those handles should be
accessed using the DEVICE_ACPI_HANDLE() macro operating on struct
device objects.

Using DEVICE_ACPI_HANDLE() in the PNP ACPI driver instead of the
driver's own copies of the ACPI handles allows us to avoid a problem
with docking stations where a machine docked before suspend to RAM
and undocked while suspended crashes during the subsequent resume (in
that case the ACPI companion of the PNP device in question doesn't
exist any more while the device is being resumed).  It also allows us
to avoid the problem where suspend to RAM fails when the machine was
undocked while suspended before (again, the ACPI companion of the PNP
device is not present any more while it is being suspended).

This change doesn't fix all of the the PNP ACPI driver's problems
with PNP devices in docking stations (generally speaking, the driver
has no idea that devices can come and go and doesn't even attempt to
handle such events), but at least it makes suspend work for the
users of docking stations who don't use the PNP devices located in
there.

References: https://bugzilla.kernel.org/show_bug.cgi?id=15100

Reported-and-tested-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2011-01-11 15:20:40 -05:00
..
isapnp BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
pnpacpi PNP / ACPI: Use DEVICE_ACPI_HANDLE() for device ACPI handle access 2011-01-11 15:20:40 -05:00
pnpbios Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
base.h ACPI/PNP: A HID value of an object never changes -> make it const 2010-10-01 19:28:51 -04:00
card.c dma-mapping: replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24) 2009-04-07 08:31:12 -07:00
core.c Merge branch 'pnp-log' into release 2010-10-25 02:13:48 -04:00
driver.c PNP / ACPI: Use DEVICE_ACPI_HANDLE() for device ACPI handle access 2011-01-11 15:20:40 -05:00
interface.c PNPACPI: add bus number support 2010-03-14 20:08:38 -04:00
Kconfig PNP: remove old CONFIG_PNP_DEBUG option 2008-10-10 23:35:33 -04:00
Makefile Merge branch 'linus' into test 2008-10-23 00:11:07 -04:00
manager.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
quirks.c vsprintf: use %pR, %pr instead of %pRt, %pRf 2009-11-04 13:06:41 -08:00
resource.c PNP: log PNP resources, as we do for PCI 2010-10-01 01:59:34 -04:00
support.c PNPACPI: add bus number support 2010-03-14 20:08:38 -04:00
system.c vsprintf: use %pR, %pr instead of %pRt, %pRf 2009-11-04 13:06:41 -08:00