]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: button: use .notify method instead of installing handler directly
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Mon, 30 Mar 2009 17:48:18 +0000 (17:48 +0000)
committerLen Brown <len.brown@intel.com>
Sun, 5 Apr 2009 06:25:07 +0000 (02:25 -0400)
commitffc571b440170dbdf17418de7e61f56844e664b4
tree86c68db2a5f5b1b400bda46370353e109c9d5482
parent8db2e3f7930e1f789773d19f1b232fad0fa247cf
ACPI: button: use .notify method instead of installing handler directly

This patch adds a .notify() method.  The presence of .notify() causes
Linux/ACPI to manage event handlers and notify handlers on our behalf,
so we don't have to install and remove them ourselves.

Note that events from fixed hardware buttons now show up as a special
notify event, so to preserve user-space backward compatibility, we
convert that back to ACPI_BUTTON_NOTIFY_STATUS.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Reviewed-by: Alex Chiang <achiang@hp.com>
CC: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/button.c