* [PATCH] spmi: prefix spmi bus device names with "spmi"
@ 2020-08-28 23:55 David Collins
0 siblings, 0 replies; only message in thread
From: David Collins @ 2020-08-28 23:55 UTC (permalink / raw)
To: Stephen Boyd; +Cc: David Collins, linux-arm-msm, linux-kernel
Change the format of spmi bus device names from:
<spmi_bus_number>-<spmi_device_sid>
Example: 0-01
to this:
spmi<spmi_bus_number>-<spmi_device_sid>
Example: spmi0-01
This helps to disambiguate SPMI device regmaps from I2C ones
at /sys/kernel/debug/regmap since I2C devices use a very
similar naming scheme: 0-0000.
Signed-off-by: David Collins <collinsd@codeaurora.org>
---
drivers/spmi/spmi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index c16b60f..ec94439 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015, 2020, The Linux Foundation. All rights reserved.
*/
#include <linux/kernel.h>
#include <linux/errno.h>
@@ -62,7 +62,7 @@ int spmi_device_add(struct spmi_device *sdev)
struct spmi_controller *ctrl = sdev->ctrl;
int err;
- dev_set_name(&sdev->dev, "%d-%02x", ctrl->nr, sdev->usid);
+ dev_set_name(&sdev->dev, "spmi%d-%02x", ctrl->nr, sdev->usid);
err = device_add(&sdev->dev);
if (err < 0) {
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-28 23:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 23:55 [PATCH] spmi: prefix spmi bus device names with "spmi" David Collins
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®