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: video: Adjust event notification routine

Adjust acpi_video_bus_notify() to cast its "data" argument to a struct
acpi_video_bus pointer instead 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>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/2409089.ElGaqSPkdT@rafael.j.wysocki

+3 -6
+3 -6
drivers/acpi/acpi_video.c
··· 1540 1540 1541 1541 static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data) 1542 1542 { 1543 - struct acpi_device *device = data; 1544 - struct acpi_video_bus *video = acpi_driver_data(device); 1543 + struct acpi_video_bus *video = data; 1544 + struct acpi_device *device = video->device; 1545 1545 struct input_dev *input; 1546 1546 int keycode = 0; 1547 - 1548 - if (!video || !video->input) 1549 - return; 1550 1547 1551 1548 input = video->input; 1552 1549 ··· 2073 2076 goto err_del; 2074 2077 2075 2078 error = acpi_dev_install_notify_handler(device, ACPI_DEVICE_NOTIFY, 2076 - acpi_video_bus_notify, device); 2079 + acpi_video_bus_notify, video); 2077 2080 if (error) 2078 2081 goto err_remove; 2079 2082