From: Kurt Borja <kuurtb@gmail.com>
To: "Armin Wolf" <W_Armin@gmx.de>,
"Hans de Goede" <hdegoede@redhat.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, Dell.Client.Kernel@dell.com,
Kurt Borja <kuurtb@gmail.com>
Subject: [PATCH RFC 1/2] platform/x86: wmi: Add wmidev_get_acpi_device_uid()
Date: Sat, 08 Mar 2025 17:05:28 -0500 [thread overview]
Message-ID: <20250308-awcc-uid-v1-1-6360892d8b95@gmail.com> (raw)
In-Reply-To: <20250308-awcc-uid-v1-0-6360892d8b95@gmail.com>
Add a non-deprecated version of wmi_get_acpi_device_uid().
Signed-off-by: Kurt Borja <kuurtb@gmail.com>
---
drivers/platform/x86/wmi.c | 12 +++++++++---
include/linux/wmi.h | 2 ++
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index e46453750d5f1475eb87342b1c5fd04fe20df335..e5ccea1fba4ffcd1ec96dd03cb3fae1dfc6737ef 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -636,7 +636,6 @@ EXPORT_SYMBOL_GPL(wmi_has_guid);
*/
char *wmi_get_acpi_device_uid(const char *guid_string)
{
- struct wmi_block *wblock;
struct wmi_device *wdev;
char *uid;
@@ -644,8 +643,7 @@ char *wmi_get_acpi_device_uid(const char *guid_string)
if (IS_ERR(wdev))
return NULL;
- wblock = container_of(wdev, struct wmi_block, dev);
- uid = acpi_device_uid(wblock->acpi_device);
+ uid = wmidev_get_acpi_device_uid(wdev);
wmi_device_put(wdev);
@@ -653,6 +651,14 @@ char *wmi_get_acpi_device_uid(const char *guid_string)
}
EXPORT_SYMBOL_GPL(wmi_get_acpi_device_uid);
+char *wmidev_get_acpi_device_uid(struct wmi_device *wdev)
+{
+ struct wmi_block *wblock = container_of(wdev, struct wmi_block, dev);
+
+ return acpi_device_uid(wblock->acpi_device);
+}
+EXPORT_SYMBOL_GPL(wmidev_get_acpi_device_uid);
+
/*
* sysfs interface
*/
diff --git a/include/linux/wmi.h b/include/linux/wmi.h
index 10751c8e5e6a0ad3ac9ae317b6f8ecfb14c9a983..625c52ee125219aaa23cf946333af33ad118aafa 100644
--- a/include/linux/wmi.h
+++ b/include/linux/wmi.h
@@ -46,6 +46,8 @@ extern union acpi_object *wmidev_block_query(struct wmi_device *wdev,
acpi_status wmidev_block_set(struct wmi_device *wdev, u8 instance, const struct acpi_buffer *in);
+char *wmidev_get_acpi_device_uid(struct wmi_device *wdev);
+
u8 wmidev_instance_count(struct wmi_device *wdev);
/**
--
2.48.1
next prev parent reply other threads:[~2025-03-08 22:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-08 22:05 [PATCH RFC 0/2] platform/x86: alienware-wmi-wmax: Extend support to many devices Kurt Borja
2025-03-08 22:05 ` Kurt Borja [this message]
2025-03-08 22:05 ` [PATCH RFC 2/2] platform/x86: alienware-wmi-wmax: Check for AWCC support using _UID Kurt Borja
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=20250308-awcc-uid-v1-1-6360892d8b95@gmail.com \
--to=kuurtb@gmail.com \
--cc=Dell.Client.Kernel@dell.com \
--cc=W_Armin@gmx.de \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.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®