ACPI: Use GPE reference counting to support shared GPEs
authorRafael J. Wysocki <rjw@sisk.pl>
Tue, 23 Feb 2010 23:52:08 +0000 (00:52 +0100)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 24 Feb 2010 22:25:23 +0000 (14:25 -0800)
commitcbbc0de700e61d0cdc854d435dbc2ef148de0e00
tree9a645bbdab91e1a00446680a95f2b86e741e0de4
parent7bc5e3f2be32ae6fb0c74cd0f707f986b3a01a26
ACPI: Use GPE reference counting to support shared GPEs

To fix a bug and address the reviewers' comments regarding the ACPI
GPE refcounting patch, do the following additional changes:

o Remove the second argument of acpi_ev_enable_gpe(),
  'write_to_hardware', because it is not necessary any more.

o Add the "bad parameter" test against 'type' in
  acpi_enable_gpe() and acpi_disable_gpe().

o Make acpi_enable_gpe() only check 'status' for runtime GPEs if
  acpi_ev_enable_gpe() was actually called.

o Make acpi_disable_gpe() return 'status' returned by
  acpi_ev_disable_gpe() and fix a bug where ACPI_GPE_TYPE_WAKE
  and ACPI_GPE_TYPE_RUNTIME were exchanged by mistake.

o Add comments explaining why acpi_set_gpe() is used by the ACPI EC
  driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/acpi/acpica/acevents.h
drivers/acpi/acpica/evgpe.c
drivers/acpi/acpica/evxfevnt.c
drivers/acpi/ec.c