diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-09-04 07:02:35 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-09-04 07:02:35 -0400 |
| commit | 42390cdec5f6e6e2ee54f308474a6ef7dd16aa5c (patch) | |
| tree | e9684c84f53272319a5acd4b9c86503f30274a51 /drivers/acpi/dock.c | |
| parent | 11c231a962c740b3216eb6565149ae5a7944cba7 (diff) | |
| parent | d210baf53b699fc61aa891c177b71d7082d3b957 (diff) | |
Merge branch 'linus' into x86/x2apic
Conflicts:
arch/x86/kernel/cpu/cyrix.c
include/asm-x86/cpufeature.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/acpi/dock.c')
| -rw-r--r-- | drivers/acpi/dock.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index bb7c51f712bd..7d2edf143f16 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
| @@ -563,9 +563,6 @@ EXPORT_SYMBOL_GPL(unregister_hotplug_dock_device); | |||
| 563 | */ | 563 | */ |
| 564 | static int handle_eject_request(struct dock_station *ds, u32 event) | 564 | static int handle_eject_request(struct dock_station *ds, u32 event) |
| 565 | { | 565 | { |
| 566 | if (!dock_present(ds)) | ||
| 567 | return -ENODEV; | ||
| 568 | |||
| 569 | if (dock_in_progress(ds)) | 566 | if (dock_in_progress(ds)) |
| 570 | return -EBUSY; | 567 | return -EBUSY; |
| 571 | 568 | ||
| @@ -573,8 +570,16 @@ static int handle_eject_request(struct dock_station *ds, u32 event) | |||
| 573 | * here we need to generate the undock | 570 | * here we need to generate the undock |
| 574 | * event prior to actually doing the undock | 571 | * event prior to actually doing the undock |
| 575 | * so that the device struct still exists. | 572 | * so that the device struct still exists. |
| 573 | * Also, even send the dock event if the | ||
| 574 | * device is not present anymore | ||
| 576 | */ | 575 | */ |
| 577 | dock_event(ds, event, UNDOCK_EVENT); | 576 | dock_event(ds, event, UNDOCK_EVENT); |
| 577 | |||
| 578 | if (!dock_present(ds)) { | ||
| 579 | complete_undock(ds); | ||
| 580 | return -ENODEV; | ||
| 581 | } | ||
| 582 | |||
| 578 | hotplug_dock_devices(ds, ACPI_NOTIFY_EJECT_REQUEST); | 583 | hotplug_dock_devices(ds, ACPI_NOTIFY_EJECT_REQUEST); |
| 579 | undock(ds); | 584 | undock(ds); |
| 580 | eject_dock(ds); | 585 | eject_dock(ds); |
