From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>, Armin Wolf <w_armin@gmx.de>,
Hans de Goede <hansg@kernel.org>
Subject: [PATCH v1 2/3] ACPI: video: Adjust event notification routine
Date: Wed, 10 Dec 2025 15:50:28 +0100 [thread overview]
Message-ID: <22933299.EfDdHjke4D@rafael.j.wysocki> (raw)
In-Reply-To: <8617910.T7Z3S40VBb@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 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>
---
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;
next prev parent reply other threads:[~2025-12-10 14:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-10 14:47 [PATCH v1 0/3] ACPI: video: Convert ACPI video driver to a platform one Rafael J. Wysocki
2025-12-10 14:48 ` [PATCH v1 1/3] ACPI: scan: Register platform devices for backlight device objects Rafael J. Wysocki
2025-12-10 14:50 ` Rafael J. Wysocki [this message]
2025-12-10 14:51 ` [PATCH v1 3/3] ACPI: video: Convert the driver to a platform one 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=22933299.EfDdHjke4D@rafael.j.wysocki \
--to=rafael@kernel.org \
--cc=hansg@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@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