]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/acpi/dock.c
ACPI: dock: avoid check _STA method
[linux-beck.git] / drivers / acpi / dock.c
index 7d2edf143f1660f387a486829ce40b548bc96eaf..25d2161ae9d929d3e25d789a0085224fcd03f7a2 100644 (file)
@@ -604,14 +604,17 @@ static int handle_eject_request(struct dock_station *ds, u32 event)
 static void dock_notify(acpi_handle handle, u32 event, void *data)
 {
        struct dock_station *ds = data;
+       struct acpi_device *tmp;
 
        switch (event) {
        case ACPI_NOTIFY_BUS_CHECK:
-               if (!dock_in_progress(ds) && dock_present(ds)) {
+               if (!dock_in_progress(ds) && acpi_bus_get_device(ds->handle,
+                  &tmp)) {
                        begin_dock(ds);
                        dock(ds);
                        if (!dock_present(ds)) {
                                printk(KERN_ERR PREFIX "Unable to dock!\n");
+                               complete_dock(ds);
                                break;
                        }
                        atomic_notifier_call_chain(&dock_notifier_list,