All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soundwire: debugfs: use controller id instead of link_id
@ 2021-01-15 16:25 ` Srinivas Kandagatla
  0 siblings, 0 replies; 23+ messages in thread
From: Srinivas Kandagatla @ 2021-01-15 16:25 UTC (permalink / raw)
  To: vkoul, yung-chuan.liao
  Cc: pierre-louis.bossart, sanyog.r.kale, gregkh, alsa-devel,
	linux-kernel, Srinivas Kandagatla

link_id can be zero and if we have multiple controller instances
in a system like Qualcomm debugfs will end-up with duplicate namespace
resulting in incorrect debugfs entries.

Using id should give a unique debugfs directory entry and should fix below
warning too.
"debugfs: Directory 'master-0' with parent 'soundwire' already present!"

Fixes: bf03473d5bcc ("soundwire: add debugfs support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/soundwire/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soundwire/debugfs.c b/drivers/soundwire/debugfs.c
index b6cad0d59b7b..5f9efa42bb25 100644
--- a/drivers/soundwire/debugfs.c
+++ b/drivers/soundwire/debugfs.c
@@ -19,7 +19,7 @@ void sdw_bus_debugfs_init(struct sdw_bus *bus)
 		return;
 
 	/* create the debugfs master-N */
-	snprintf(name, sizeof(name), "master-%d", bus->link_id);
+	snprintf(name, sizeof(name), "master-%d", bus->id);
 	bus->debugfs = debugfs_create_dir(name, sdw_debugfs_root);
 }
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2021-02-06 10:23 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 16:25 [PATCH] soundwire: debugfs: use controller id instead of link_id Srinivas Kandagatla
2021-01-15 16:25 ` Srinivas Kandagatla
2021-01-19 14:52 ` Vinod Koul
2021-01-19 14:52   ` Vinod Koul
2021-01-19 15:54   ` Pierre-Louis Bossart
2021-01-19 15:54     ` Pierre-Louis Bossart
2021-01-19 17:17     ` Srinivas Kandagatla
2021-01-19 17:17       ` Srinivas Kandagatla
2021-01-19 19:09       ` Pierre-Louis Bossart
2021-01-19 19:09         ` Pierre-Louis Bossart
2021-01-21 12:03         ` Srinivas Kandagatla
2021-01-21 12:03           ` Srinivas Kandagatla
2021-01-21 15:12           ` Pierre-Louis Bossart
2021-01-21 17:23             ` Srinivas Kandagatla
2021-01-21 18:22               ` Pierre-Louis Bossart
2021-02-01 10:14               ` Vinod Koul
2021-02-01 10:14                 ` Vinod Koul
2021-02-01 16:10                 ` Pierre-Louis Bossart
2021-02-02  4:18                   ` Vinod Koul
2021-02-02  4:18                     ` Vinod Koul
2021-02-02 16:43                     ` Pierre-Louis Bossart
2021-02-03 11:14                       ` Vinod Koul
2021-02-06 10:22                         ` Vinod Koul

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.