Linux ACPI
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: loongarch@lists.linux.dev, Linux ACPI <linux-acpi@vger.kernel.org>
Cc: Huacai Chen <chenhuacai@kernel.org>,
	WANG Xuerui <kernel@xen0n.name>, Hans de Goede <hansg@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH v1] platform/loongarch: laptop: Stop setting acpi_device_class()
Date: Mon, 06 Jul 2026 14:33:23 +0200	[thread overview]
Message-ID: <2444678.ElGaqSPkdT@rafael.j.wysocki> (raw)

From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>

The driver populates acpi_device_class() which is never read afterward,
so make it stop doing that and drop the symbol defined specifically for
this purpose.

No intentional functional impact.

This will facilitate the removal of device_class from struct
acpi_device_pnp in the future.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/platform/loongarch/loongson-laptop.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/platform/loongarch/loongson-laptop.c b/drivers/platform/loongarch/loongson-laptop.c
index 61b18ac206c9..f2dcc6d78051 100644
--- a/drivers/platform/loongarch/loongson-laptop.c
+++ b/drivers/platform/loongarch/loongson-laptop.c
@@ -30,7 +30,6 @@
 #define LOONGSON_ACPI_HKEY_HID	"LOON0000"
 
 #define ACPI_LAPTOP_NAME "loongson-laptop"
-#define ACPI_LAPTOP_ACPI_EVENT_PREFIX "loongson"
 
 #define MAX_ACPI_ARGS			3
 #define GENERIC_HOTKEY_MAP_MAX		64
@@ -167,8 +166,6 @@ static int __init setup_acpi_notify(struct generic_sub_driver *sub_driver)
 	}
 
 	sub_driver->device->driver_data = sub_driver;
-	sprintf(acpi_device_class(sub_driver->device), "%s/%s",
-		ACPI_LAPTOP_ACPI_EVENT_PREFIX, sub_driver->name);
 
 	status = acpi_install_notify_handler(*sub_driver->handle,
 			sub_driver->type, dispatch_acpi_notify, sub_driver);
-- 
2.51.0





             reply	other threads:[~2026-07-06 12:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06 12:33 Rafael J. Wysocki [this message]
2026-07-08 14:30 ` [PATCH v1] platform/loongarch: laptop: Stop setting acpi_device_class() Andy Shevchenko

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=2444678.ElGaqSPkdT@rafael.j.wysocki \
    --to=rafael@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=chenhuacai@kernel.org \
    --cc=hansg@kernel.org \
    --cc=kernel@xen0n.name \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    /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