Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+4 -5
+4 -5
drivers/acpi/thermal.c
··· 670 670 671 671 static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data) 672 672 { 673 - struct acpi_device *device = data; 674 - struct acpi_thermal *tz = acpi_driver_data(device); 673 + struct acpi_thermal *tz = data; 675 674 676 675 if (!tz) 677 676 return; ··· 684 685 acpi_thermal_trips_update(tz, event); 685 686 break; 686 687 default: 687 - acpi_handle_debug(device->handle, "Unsupported event [0x%x]\n", 688 - event); 688 + acpi_handle_debug(tz->device->handle, 689 + "Unsupported event [0x%x]\n", event); 689 690 break; 690 691 } 691 692 } ··· 880 881 acpi_device_bid(device), deci_kelvin_to_celsius(tz->temp_dk)); 881 882 882 883 result = acpi_dev_install_notify_handler(device, ACPI_DEVICE_NOTIFY, 883 - acpi_thermal_notify, device); 884 + acpi_thermal_notify, tz); 884 885 if (result) 885 886 goto flush_wq; 886 887