]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/acpi/dock.c
ACPI / scan: Add acpi_device objects for all device nodes in the namespace
[karo-tx-linux.git] / drivers / acpi / dock.c
index dcd73ccb514c601df4efdee7043f2a7cffeb718e..de032010da3c18613900a1a9951e24610af644d1 100644 (file)
@@ -323,14 +323,11 @@ static int dock_present(struct dock_station *ds)
  */
 static void dock_create_acpi_device(acpi_handle handle)
 {
-       struct acpi_device *device;
+       struct acpi_device *device = NULL;
        int ret;
 
-       if (acpi_bus_get_device(handle, &device)) {
-               /*
-                * no device created for this object,
-                * so we should create one.
-                */
+       acpi_bus_get_device(handle, &device);
+       if (!acpi_device_enumerated(device)) {
                ret = acpi_bus_scan(handle);
                if (ret)
                        pr_debug("error adding bus, %x\n", -ret);