From 65b6feb7815eeceaeb99fdf62992e8559b8dce9f Mon Sep 17 00:00:00 2001 From: Gilad Broner Date: Tue, 10 Feb 2015 13:43:54 +0200 Subject: 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 [subhashj@codeaurora.org: resolved merge conflicts] Signed-off-by: Subhash Jadavani --- drivers/scsi/ufs/ufs-debugfs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drivers') 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; -- cgit v1.2.3