diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-12-10 17:43:11 +0300 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-12-26 17:09:35 +0300 |
| commit | a4975385997a6fa1a69c3e5004a48430830f960f (patch) | |
| tree | 9bfd1b47634b4c5b600e7c6d728ec6fccf90d0e3 | |
| parent | d27ccaebab98a77c236494e8fc6857c629b5ffdd (diff) | |
| download | linux-a4975385997a6fa1a69c3e5004a48430830f960f.tar.xz | |
ACPI: thermal: Adjust event notification routine
Adjust acpi_thermal_notify() to cast its "data" argument to a struct
acpi_thermal pointer istead of a struct acpi_device one, which allows
the use of acpi_driver_data() to be limited and will facilitate
subsequent changes.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: lihuisong@huawei.com
Link: https://patch.msgid.link/5035876.GXAFRqVoOG@rafael.j.wysocki
| -rw-r--r-- | drivers/acpi/thermal.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index a511f9ea0267..cad19e62537e 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -670,8 +670,7 @@ static void acpi_thermal_unregister_thermal_zone(struct acpi_thermal *tz) static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data) { - struct acpi_device *device = data; - struct acpi_thermal *tz = acpi_driver_data(device); + struct acpi_thermal *tz = data; if (!tz) return; @@ -685,8 +684,8 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data) acpi_thermal_trips_update(tz, event); break; default: - acpi_handle_debug(device->handle, "Unsupported event [0x%x]\n", - event); + acpi_handle_debug(tz->device->handle, + "Unsupported event [0x%x]\n", event); break; } } @@ -881,7 +880,7 @@ static int acpi_thermal_add(struct acpi_device *device) acpi_device_bid(device), deci_kelvin_to_celsius(tz->temp_dk)); result = acpi_dev_install_notify_handler(device, ACPI_DEVICE_NOTIFY, - acpi_thermal_notify, device); + acpi_thermal_notify, tz); if (result) goto flush_wq; |
