aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/dock.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index c10761533d6f..7c86d01346e6 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -741,29 +741,16 @@ static struct notifier_block dock_acpi_notifier = {
741 * check to see if an object has an _EJD method. If it does, then it 741 * check to see if an object has an _EJD method. If it does, then it
742 * will see if it is dependent on the dock station. 742 * will see if it is dependent on the dock station.
743 */ 743 */
744static acpi_status __init 744static acpi_status __init find_dock_devices(acpi_handle handle, u32 lvl,
745find_dock_devices(acpi_handle handle, u32 lvl, void *context, void **rv) 745 void *context, void **rv)
746{ 746{
747 acpi_status status;
748 acpi_handle tmp, parent;
749 struct dock_station *ds = context; 747 struct dock_station *ds = context;
748 acpi_handle ejd = NULL;
750 749
751 status = acpi_bus_get_ejd(handle, &tmp); 750 acpi_bus_get_ejd(handle, &ejd);
752 if (ACPI_FAILURE(status)) { 751 if (ejd == ds->handle)
753 /* try the parent device as well */
754 status = acpi_get_parent(handle, &parent);
755 if (ACPI_FAILURE(status))
756 goto fdd_out;
757 /* see if parent is dependent on dock */
758 status = acpi_bus_get_ejd(parent, &tmp);
759 if (ACPI_FAILURE(status))
760 goto fdd_out;
761 }
762
763 if (tmp == ds->handle)
764 add_dock_dependent_device(ds, handle); 752 add_dock_dependent_device(ds, handle);
765 753
766fdd_out:
767 return AE_OK; 754 return AE_OK;
768} 755}
769 756