From: "Mark Pearson" <mpearson-lenovo@squebb.ca>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"Hans de Goede" <hansg@kernel.org>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Corentin Chary" <corentin.chary@gmail.com>,
"Luke D . Jones" <luke@ljones.dev>,
"Denis Benato" <denis.benato@linux.dev>,
"Jonathan Woithe" <jwoithe@just42.net>,
"Robert Gerlach" <khnz@gmx.de>,
"Henrique de Moraes Holschuh" <hmh@hmh.eng.br>,
"Derek J . Clark" <derekjohn.clark@gmail.com>,
"Kenneth Chan" <kenneth.t.chan@gmail.com>,
"Mattia Dongili" <malattia@linux.it>,
"Azael Avalos" <coproscefalo@gmail.com>
Subject: Re: [PATCH v1 05/10] platform/x86: thinkpad_acpi: Stop setting acpi_device_class()
Date: Fri, 03 Jul 2026 08:18:42 -0400 [thread overview]
Message-ID: <c88257d0-1302-4d7b-a6ac-91281a48d7c5@app.fastmail.com> (raw)
In-Reply-To: <23182921.EfDdHjke4D@rafael.j.wysocki>
On Fri, Jul 3, 2026, at 7:30 AM, Rafael J. Wysocki wrote:
> From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
>
> To facilitate the removal of device_class from struct acpi_device_pnp
> in the future, make the driver store the device class string used for
> generating ACPI netlink events in a new device_class field in struct
> ibm_struct.
>
> No intentional functional impact.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/platform/x86/lenovo/thinkpad_acpi.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c
> b/drivers/platform/x86/lenovo/thinkpad_acpi.c
> index 445e1403308e..f614b2701d48 100644
> --- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
> +++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
> @@ -309,6 +309,7 @@ struct tp_acpi_drv_struct {
>
> struct ibm_struct {
> char *name;
> + acpi_device_class device_class;
>
> int (*read) (struct seq_file *);
> int (*write) (char *);
> @@ -838,9 +839,8 @@ static int __init setup_acpi_notify(struct ibm_struct *ibm)
> }
>
> ibm->acpi->device->driver_data = ibm;
> - scnprintf(acpi_device_class(ibm->acpi->device),
> - sizeof(acpi_device_class(ibm->acpi->device)),
> - "%s/%s", TPACPI_ACPI_EVENT_PREFIX, ibm->name);
> + scnprintf(ibm->device_class, sizeof(ibm->device_class), "%s/%s",
> + TPACPI_ACPI_EVENT_PREFIX, ibm->name);
>
> status = acpi_install_notify_handler(*ibm->acpi->handle,
> ibm->acpi->type, dispatch_acpi_notify, ibm);
> @@ -3869,7 +3869,7 @@ static void hotkey_notify(struct ibm_struct *ibm,
> u32 event)
> pr_err("unknown HKEY notification event %d\n", event);
> /* forward it to userspace, maybe it knows how to handle it */
> acpi_bus_generate_netlink_event(
> - ibm->acpi->device->pnp.device_class,
> + ibm->device_class,
> dev_name(&ibm->acpi->device->dev),
> event, 0);
> return;
> @@ -3949,7 +3949,7 @@ static void hotkey_notify(struct ibm_struct *ibm,
> u32 event)
> /* netlink events */
> if (send_acpi_ev) {
> acpi_bus_generate_netlink_event(
> - ibm->acpi->device->pnp.device_class,
> + ibm->device_class,
> dev_name(&ibm->acpi->device->dev),
> event, hkey);
> }
> --
> 2.51.0
Looks good to me.
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
next prev parent reply other threads:[~2026-07-03 12:19 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 11:15 [PATCH v1 00/10] platform/x86: Stop using acpi_device_name/class() Rafael J. Wysocki
2026-07-03 11:19 ` [PATCH v1 01/10] platform/x86: asus-laptop: Stop setting acpi_device_name/class() Rafael J. Wysocki
2026-07-03 11:21 ` [PATCH v1 02/10] platform/x86: eeepc-laptop: " Rafael J. Wysocki
2026-07-03 11:23 ` [PATCH v1 03/10] platform/x86: fujitsu-laptop: " Rafael J. Wysocki
2026-07-03 13:08 ` Jonathan Woithe
2026-07-03 11:28 ` [PATCH v1 04/10] platform/x86: fujitsu-tablet: " Rafael J. Wysocki
2026-07-03 11:30 ` [PATCH v1 05/10] platform/x86: thinkpad_acpi: Stop setting acpi_device_class() Rafael J. Wysocki
2026-07-03 12:18 ` Andy Shevchenko
2026-07-03 12:20 ` Rafael J. Wysocki (Intel)
2026-07-03 12:18 ` Mark Pearson [this message]
2026-07-03 11:30 ` [PATCH v1 06/10] platform/x86: panasonic-laptop: Stop setting acpi_device_name/class() Rafael J. Wysocki (Intel)
2026-07-03 11:32 ` [PATCH v1 07/10] platform/x86: sony-laptop: Stop setting acpi_device_class() Rafael J. Wysocki
2026-07-03 11:36 ` [PATCH v1 08/10] platform/x86: toshiba_acpi: Do not use uninitialized device_class Rafael J. Wysocki
2026-07-03 11:36 ` [PATCH v1 09/10] platform/x86: toshiba_haps: " Rafael J. Wysocki
2026-07-03 11:37 ` [PATCH v1 10/10] platform/x86: xo15-ebook: Stop setting acpi_device_name/class() Rafael J. Wysocki
2026-07-03 12:10 ` [PATCH v1 00/10] platform/x86: Stop using acpi_device_name/class() Andy Shevchenko
2026-07-03 12:15 ` Rafael J. Wysocki (Intel)
2026-07-03 12:41 ` Andy Shevchenko
2026-07-03 12:44 ` Rafael J. Wysocki (Intel)
2026-07-03 12:47 ` Andy Shevchenko
2026-07-03 12:19 ` Andy Shevchenko
2026-07-03 12:24 ` Rafael J. Wysocki (Intel)
2026-07-06 17:20 ` Ilpo Järvinen
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=c88257d0-1302-4d7b-a6ac-91281a48d7c5@app.fastmail.com \
--to=mpearson-lenovo@squebb.ca \
--cc=andriy.shevchenko@linux.intel.com \
--cc=coproscefalo@gmail.com \
--cc=corentin.chary@gmail.com \
--cc=denis.benato@linux.dev \
--cc=derekjohn.clark@gmail.com \
--cc=hansg@kernel.org \
--cc=hmh@hmh.eng.br \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jwoithe@just42.net \
--cc=kenneth.t.chan@gmail.com \
--cc=khnz@gmx.de \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luke@ljones.dev \
--cc=malattia@linux.it \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
/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
all inboxes | Powered by JetHome®