diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-15 12:26:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-15 12:26:37 -0400 |
commit | ffaa5b984a9322bbd5d9a7f0814ca2ce70feebe5 (patch) | |
tree | 171ed020ae3f9034150e832c613b650e803b62fb /drivers/acpi/dock.c | |
parent | 024b246ed24492d6c2ee14c34d742b137fce1b94 (diff) | |
parent | 0f2456236459f3ddef48a8a75d10b2d6ecf1a93d (diff) |
Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6
* 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6:
ACPI: Fix thermal shutdowns
ACPI: bounds check IRQ to prevent memory corruption
ACPI: Avoid bogus EC timeout when EC is in Polling mode
ACPI : Add the EC dmi table to fix the incorrect ECDT table
ACPI: Properly clear flags on false-positives and send uevent on sudden unplug
acpi: trivial cleanups
acer-wmi: Fix wireless and bluetooth on early AMW0 v2 laptops
ACPI: WMI: Set instance for query block calls
ACPICA: Additional error checking for pathname utilities
ACPICA: Fix possible memory leak in Unload() operator
ACPICA: Fix memory leak when deleting thermal/processor objects
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); |