ACPI: button: Eliminate the driver notify callback
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 4 Jun 2023 15:19:06 +0000 (17:19 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 16 Jun 2023 17:48:08 +0000 (19:48 +0200)
commit0d51157dfaac05ea66616d8a250dce04bef49a4f
tree3436de141c95bdd89e0a4d52e5757f80958e3c3b
parent858fd168a95c5b9669aac8db6c14a9aeab446375
ACPI: button: Eliminate the driver notify callback

Rework the ACPI button driver to install notify handlers or fixed
event handlers for the devices it binds to by itself, reduce the
indentation level in its notify handler routine and drop its
notify callback.

This will allow acpi_device_install_notify_handler() and
acpi_device_remove_notify_handler() to be simplified going forward
and it will allow the driver to use different notify handlers for the
lid and for the power and sleep buttons.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Michal Wilczynski <michal.wilczynski@intel.com>
drivers/acpi/button.c