All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@dell.com>
To: dvhart@infradead.org, Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	platform-driver-x86@vger.kernel.org,
	Andy Lutomirski <luto@kernel.org>,
	Mario Limonciello <mario.limonciello@dell.com>
Subject: [PATCH 1/2] platform/x86: wmi: prefix sysfs files in /sys/bus/wmi with the ACPI device
Date: Fri,  8 Dec 2017 20:34:20 -0600	[thread overview]
Message-ID: <1512786861-1014-2-git-send-email-mario.limonciello@dell.com> (raw)
In-Reply-To: <1512786861-1014-1-git-send-email-mario.limonciello@dell.com>

It's possible for the same GUID to show up on as system twice.
This means using solely the GUID for identify the file will not
be sufficient.

Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
---
 drivers/platform/x86/wmi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 791449a2370f..45d9010aafcf 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -1081,7 +1081,8 @@ static int wmi_create_device(struct device *wmi_bus_dev,
 	wblock->dev.dev.bus = &wmi_bus_type;
 	wblock->dev.dev.parent = wmi_bus_dev;
 
-	dev_set_name(&wblock->dev.dev, "%pUL", gblock->guid);
+	dev_set_name(&wblock->dev.dev, "%s-%pUL",
+		     dev_name(&wblock->acpi_device->dev), gblock->guid);
 
 	device_initialize(&wblock->dev.dev);
 
-- 
2.14.1

  reply	other threads:[~2017-12-09  2:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-09  2:34 [PATCH 0/2] Parse multiple duplicate WMI GUIDs Mario Limonciello
2017-12-09  2:34 ` Mario Limonciello [this message]
2017-12-09  2:52   ` [PATCH 1/2] platform/x86: wmi: prefix sysfs files in /sys/bus/wmi with the ACPI device Andy Lutomirski
2017-12-09  3:41     ` Mario.Limonciello
2017-12-09  3:41       ` Mario.Limonciello
2017-12-09 21:32       ` Andy Lutomirski
2018-07-06 23:00         ` Darren Hart
2018-11-29  0:22         ` Darren Hart
2017-12-09  2:34 ` [PATCH 2/2] platform/x86: wmi: Allow creating WMI devices with the same GUID Mario Limonciello
2017-12-09 20:43   ` Andy Lutomirski

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=1512786861-1014-2-git-send-email-mario.limonciello@dell.com \
    --to=mario.limonciello@dell.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.