ACPI / ACPICA: Fix sysfs GPE interface
commitc1dbd27d6a46adc6e2021d0febfdc3898e383f05
authorRafael J. Wysocki <rjw@sisk.pl>
Tue, 8 Jun 2010 08:50:53 +0000 (8 10:50 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:30:21 +0000 (2 10:30 -0700)
treef8861fc678d849caf2074ce8cd934e5dacd7976e
parent02f7f4c9f46e9da6d0e7f8b380703eaa7a59bebc
ACPI / ACPICA: Fix sysfs GPE interface

commit 9d3c752de65dbfa6e522f1d666deb0ac152ef367 upstream.

The sysfs interface allowing user space to disable/enable GPEs
doesn't work correctly, because a GPE disabled this way will be
re-enabled shortly by acpi_ev_asynch_enable_gpe() if it was
previosuly enabled by acpi_enable_gpe() (in which case the
corresponding bit in its enable register's enable_for_run mask is
set).

To address this issue make the sysfs GPE interface use
acpi_enable_gpe() and acpi_disable_gpe() instead of acpi_set_gpe()
so that GPE reference counters are modified by it along with the
values of GPE enable registers.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/acpi/system.c