[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <22933299.EfDdHjke4D@rafael.j.wysocki>
Date: Wed, 10 Dec 2025 15:50:28 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Linux ACPI <linux-acpi@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux PM <linux-pm@...r.kernel.org>,
Armin Wolf <w_armin@....de>, Hans de Goede <hansg@...nel.org>
Subject: [PATCH v1 2/3] ACPI: video: Adjust event notification routine
From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Adjust acpi_video_bus_notify() to cast its "data" argument to a struct
acpi_video_bus 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@...el.com>
---
drivers/acpi/acpi_video.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -1540,14 +1540,11 @@ static int acpi_video_bus_stop_devices(s
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 acp
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;
Powered by blists - more mailing lists