From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Armin Wolf <w_armin@gmx.de>,
Hans de Goede <hansg@kernel.org>
Subject: [RESEND][PATCH v1 2/3] ACPI: video: Adjust event notification routine
Date: Fri, 02 Jan 2026 12:52:15 +0100 [thread overview]
Message-ID: <2409089.ElGaqSPkdT@rafael.j.wysocki> (raw)
In-Reply-To: <12824456.O9o76ZdvQC@rafael.j.wysocki>
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
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>
---
drivers/acpi/acpi_video.c | 9 +++------
1 file 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;
--
2.51.0
next prev parent reply other threads:[~2026-01-02 11:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-02 11:48 [RESEND][PATCH v1 0/3] ACPI: video: Convert ACPI video driver to a platform one Rafael J. Wysocki
2026-01-02 11:50 ` [RESEND][PATCH v1 1/3] ACPI: scan: Register platform devices for backlight device objects Rafael J. Wysocki
2026-01-02 11:52 ` Rafael J. Wysocki [this message]
2026-01-02 11:53 ` [RESEND][PATCH v1 3/3] ACPI: video: Convert the driver to a platform one Rafael J. Wysocki
2026-01-05 15:42 ` [RESEND][PATCH v1 0/3] ACPI: video: Convert ACPI video " Hans de Goede
2026-01-05 17:43 ` Rafael J. Wysocki
2026-01-12 20:19 ` Armin Wolf
2026-01-12 20:27 ` Rafael J. Wysocki
2026-01-14 22:57 ` Armin Wolf
2026-01-15 13:08 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2409089.ElGaqSPkdT@rafael.j.wysocki \
--to=rafael@kernel.org \
--cc=hansg@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=w_armin@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox