/* This function is called by acpi_walk_namespace. It will check to see if an object has an _EJD method. If it does, then it will see if it is dependent on the dock station.  */
static acpi_status find_dock_devices(acpi_handle handle, u32 lvl, void *context, void **rv)
/* This function is called by acpi_walk_namespace. It will check to see if an object has an _EJD method. If it does, then it will see if it is dependent on the dock station.  */
static acpi_status find_dock_devices(acpi_handle handle, u32 lvl, void *context, void **rv)
{
	acpi_status status;
	acpi_handle tmp, parent;
	struct dock_station *ds = context;
	status = acpi_bus_get_ejd(handle, &tmp);
	if (ACPI_FAILURE(status)) {
		status = acpi_get_parent(handle, &parent);
		if (ACPI_FAILURE(status))
			goto fdd_out;
		status = acpi_bus_get_ejd(parent, &tmp);
		if (ACPI_FAILURE(status))
			goto fdd_out;
	}
	if (tmp == ds->handle)
		add_dock_dependent_device(ds, handle);
fdd_out:
	return AE_OK;
}