summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dock.c
diff options
context:
space:
mode:
authorKristen Carlson Accardi <kristen.c.accardi@intel.com>2007-02-03 04:33:00 +0100
committerLen Brown <len.brown@intel.com>2007-02-03 07:11:17 +0100
commitfe9a2f77e5ad508b18671571c0b3f6f79ea709a8 (patch)
tree73f9e076865ea4c3a4ae4ce9f5aad26fff8668fe /drivers/acpi/dock.c
parentMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/... (diff)
downloadlinux-fe9a2f77e5ad508b18671571c0b3f6f79ea709a8.tar.xz
linux-fe9a2f77e5ad508b18671571c0b3f6f79ea709a8.zip
ACPI: dock: check if parent is on dock
When determining if a device is on a dock station, we should check the parent of the device as well. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r--drivers/acpi/dock.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 90990a4b6526..688e83a16906 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -615,20 +615,28 @@ static acpi_status
find_dock_devices(acpi_handle handle, u32 lvl, void *context, void **rv)
{
acpi_status status;
- acpi_handle tmp;
+ acpi_handle tmp, parent;
struct dock_station *ds = context;
struct dock_dependent_device *dd;
status = acpi_bus_get_ejd(handle, &tmp);
- if (ACPI_FAILURE(status))
- return AE_OK;
+ if (ACPI_FAILURE(status)) {
+ /* try the parent device as well */
+ status = acpi_get_parent(handle, &parent);
+ if (ACPI_FAILURE(status))
+ goto fdd_out;
+ /* see if parent is dependent on dock */
+ status = acpi_bus_get_ejd(parent, &tmp);
+ if (ACPI_FAILURE(status))
+ goto fdd_out;
+ }
if (tmp == ds->handle) {
dd = alloc_dock_dependent_device(handle);
if (dd)
add_dock_dependent_device(ds, dd);
}
-
+fdd_out:
return AE_OK;
}