ACPI: bus: Add context argument to acpi_dev_install_notify_handler()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 6 Oct 2023 15:32:51 +0000 (17:32 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 6 Oct 2023 15:32:51 +0000 (17:32 +0200)
commit470508f63ad2483b1ae82ed67cd504ad408b2a35
treed5c0a05b6eedc2c5c8e9b7bcb7500eea0dfe4b12
parent5f3c10ac34ec2dc199e5bcc3ff856b42cf0e12df
ACPI: bus: Add context argument to acpi_dev_install_notify_handler()

Add void *context arrgument to the list of arguments of
acpi_dev_install_notify_handler() and modify it to pass that argument
as context to acpi_install_notify_handler() instead of its first
argument which is problematic in general (for example, if platform
drivers used it, they would rather get struct platform_device pointers
or pointers to their private data from the context arguments of their
notify handlers).

Make all of the current callers of acpi_dev_install_notify_handler()
take this change into account so as to avoid altering the general
functionality.

Co-developed-by: Michal Wilczynski <michal.wilczynski@intel.com>
Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ac.c
drivers/acpi/acpi_video.c
drivers/acpi/battery.c
drivers/acpi/bus.c
drivers/acpi/hed.c
drivers/acpi/nfit/core.c
drivers/acpi/thermal.c
include/acpi/acpi_bus.h