diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-01-02 14:52:15 +0300 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-01-15 16:27:00 +0300 |
| commit | d91a624a69631f852efc2ec7d910d5439277e47f (patch) | |
| tree | 37e135cb18bc8dcbd21c592a6b499cf299809a36 | |
| parent | 336aae5c4e1a473018136524b18a74877310c0a3 (diff) | |
| download | linux-d91a624a69631f852efc2ec7d910d5439277e47f.tar.xz | |
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
| -rw-r--r-- | drivers/acpi/acpi_video.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c index be8e7e18abca..54e09e7f8e77 100644 --- a/drivers/acpi/acpi_video.c +++ b/drivers/acpi/acpi_video.c @@ -1540,14 +1540,11 @@ static int acpi_video_bus_stop_devices(struct acpi_video_bus *video) static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data) { - struct acpi_device *device = data; - struct acpi_video_bus *video = acpi_driver_data(device); + struct acpi_video_bus *video = data; + struct acpi_device *device = video->device; struct input_dev *input; int keycode = 0; - if (!video || !video->input) - return; - input = video->input; switch (event) { @@ -2076,7 +2073,7 @@ static int acpi_video_bus_add(struct acpi_device *device) goto err_del; error = acpi_dev_install_notify_handler(device, ACPI_DEVICE_NOTIFY, - acpi_video_bus_notify, device); + acpi_video_bus_notify, video); if (error) goto err_remove; |
