alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: vkoul@kernel.org, yung-chuan.liao@linux.intel.com
Cc: alsa-devel@alsa-project.org, gregkh@linuxfoundation.org,
	pierre-louis.bossart@linux.intel.com,
	linux-kernel@vger.kernel.org,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	sanyog.r.kale@intel.com
Subject: [PATCH] soundwire: debugfs: use controller id instead of link_id
Date: Fri, 15 Jan 2021 16:25:59 +0000	[thread overview]
Message-ID: <20210115162559.20869-1-srinivas.kandagatla@linaro.org> (raw)

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


             reply	other threads:[~2021-01-15 16:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15 16:25 Srinivas Kandagatla [this message]
2021-01-19 14:52 ` [PATCH] soundwire: debugfs: use controller id instead of link_id Vinod Koul
2021-01-19 15:54   ` Pierre-Louis Bossart
2021-01-19 17:17     ` Srinivas Kandagatla
2021-01-19 19:09       ` Pierre-Louis Bossart
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 16:10                 ` Pierre-Louis Bossart
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

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=20210115162559.20869-1-srinivas.kandagatla@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=sanyog.r.kale@intel.com \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).