diff options
author | Holger Macht <hmacht@suse.de> | 2008-03-11 20:07:27 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-03-18 05:16:38 -0400 |
commit | 9171f83488940e4ff85f1b7137773eb1f306cdef (patch) | |
tree | 56440be40144ea5d83cb6f59bc7b49fe53252318 /drivers/acpi/dock.c | |
parent | baadac8b10c5ac15ce3d26b68fa266c8889b163f (diff) |
ACPI: Set flag DOCK_UNDOCKING when triggered via sysfs
begin_undock() is only called when triggered via a acpi notify handler
(pressing the undock button on the dock station), but complete_undock() is
always called after the eject. So if a undock is triggered through a sysfs
write, the flag DOCK_UNDOCKING has to be set for the dock station,
too. Otherwise this will freeze the system hard.
Signed-off-by: Holger Macht <hmacht@suse.de>
Acked-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r-- | drivers/acpi/dock.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 307cef65c247..fa44fb96fc34 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -710,6 +710,7 @@ static ssize_t write_undock(struct device *dev, struct device_attribute *attr, | |||
710 | if (!count) | 710 | if (!count) |
711 | return -EINVAL; | 711 | return -EINVAL; |
712 | 712 | ||
713 | begin_undock(dock_station); | ||
713 | ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST); | 714 | ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST); |
714 | return ret ? ret: count; | 715 | return ret ? ret: count; |
715 | } | 716 | } |