]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: dock: Don't eval _STA on every show_docked sysfs read
authorHolger Macht <hmacht@suse.de>
Tue, 20 Jan 2009 11:18:24 +0000 (12:18 +0100)
committerLen Brown <len.brown@intel.com>
Sat, 7 Feb 2009 03:08:15 +0000 (22:08 -0500)
commit9b2b00337c364aa0e393068c9286eadb8ef4cf3a
treeca1098636b4918c00a49faf34c4e0d6e99852296
parent27687b2a852f38a1c73382ed9ede6ac497255432
ACPI: dock: Don't eval _STA on every show_docked sysfs read

Some devices trigger a DEVICE_CHECK on every evalutation of _STA. This
can also be seen in commit 0aa85e6482e6dc9eea0cf17495ea7e99be9a1dbc
(ACPI: dock: avoid check _STA method).  If an undock is processed, the
dock driver sends a uevent and userspace might read the show_docked
property in sysfs. This causes an evaluation of _STA of the particular
device which causes the dock driver to immediately dock again.

In any case, evaluation of _STA (show_docked) does not necessarily mean
that we are docked, so check with the internal device structure.

http://bugzilla.kernel.org/show_bug.cgi?id=12360

Signed-off-by: Holger Macht <hmacht@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/dock.c