Skip to content

Commit

Permalink
ACPI: Set flag DOCK_UNDOCKING when triggered via sysfs
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Kristen Carlson Accardi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Len Brown <[email protected]>
  • Loading branch information
Holger Macht authored and lenb committed Mar 18, 2008
1 parent baadac8 commit 9171f83
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/acpi/dock.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ static ssize_t write_undock(struct device *dev, struct device_attribute *attr,
if (!count)
return -EINVAL;

begin_undock(dock_station);
ret = handle_eject_request(dock_station, ACPI_NOTIFY_EJECT_REQUEST);
return ret ? ret: count;
}
Expand Down

0 comments on commit 9171f83

Please sign in to comment.