diff options
author | Gilad Broner <gbroner@codeaurora.org> | 2015-02-10 13:43:54 +0200 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 10:58:54 -0700 |
commit | 65b6feb7815eeceaeb99fdf62992e8559b8dce9f (patch) | |
tree | e926f0ddaee6b198557b980be8417812afb146cf | |
parent | 2aa36bf1f93186b810d40ae89f7242c9db94a3b0 (diff) |
scsi: ufs: add instance number to UFS debug-fs entry
UFS exposes a debug-fs directory with various information under
the name "ufs", which will not scale in case more than one UFS
controller is available in the system.
Add the instance number (inherited from the scsi host number) to
the debug-fs entry name.
Change-Id: I1a31be72b90c26cc840219d7ba2944ec4c0bc8f8
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
[subhashj@codeaurora.org: resolved merge conflicts]
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
-rw-r--r-- | drivers/scsi/ufs/ufs-debugfs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufs-debugfs.c b/drivers/scsi/ufs/ufs-debugfs.c index 9aaf7e5eaf92..8babc3045d24 100644 --- a/drivers/scsi/ufs/ufs-debugfs.c +++ b/drivers/scsi/ufs/ufs-debugfs.c @@ -1026,12 +1026,17 @@ static const struct file_operations ufsdbg_req_stats_desc = { void ufsdbg_add_debugfs(struct ufs_hba *hba) { + char root_name[sizeof("ufshcd00")]; + if (!hba) { dev_err(hba->dev, "%s: NULL hba, exiting", __func__); goto err_no_root; } - hba->debugfs_files.debugfs_root = debugfs_create_dir("ufs", NULL); + snprintf(root_name, ARRAY_SIZE(root_name), "%s%d", UFSHCD, + hba->host->host_no); + + hba->debugfs_files.debugfs_root = debugfs_create_dir(root_name, NULL); if (IS_ERR(hba->debugfs_files.debugfs_root)) /* Don't complain -- debugfs just isn't enabled */ goto err_no_root; |