diff mbox series

scsi: ufs: Give an unique ID to each ufs-bsg

Message ID 0101016ec4a25ed1-faa62196-1f0c-48a8-9cba-a433245d0ed0-000000@us-west-2.amazonses.com (mailing list archive)
State Superseded
Headers show
Series scsi: ufs: Give an unique ID to each ufs-bsg | expand

Commit Message

Can Guo Dec. 2, 2019, 3:23 a.m. UTC
Considering there can be multiple UFS hosts in SoC, give each ufs-bsg an
unique ID by appending the scsi host number to its device name.

Signed-off-by: Can Guo <cang@codeaurora.org>

Comments

Christoph Hellwig Dec. 2, 2019, 5:53 p.m. UTC | #1
On Mon, Dec 02, 2019 at 03:23:25AM +0000, Can Guo wrote:
> Considering there can be multiple UFS hosts in SoC, give each ufs-bsg an
> unique ID by appending the scsi host number to its device name.
> 
> Signed-off-by: Can Guo <cang@codeaurora.org>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

This should also get a Fixes: tag so that it gets backported.
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufs_bsg.c b/drivers/scsi/ufs/ufs_bsg.c
index dc2f6d2..3ef5b78 100644
--- a/drivers/scsi/ufs/ufs_bsg.c
+++ b/drivers/scsi/ufs/ufs_bsg.c
@@ -202,7 +202,7 @@  int ufs_bsg_probe(struct ufs_hba *hba)
 	bsg_dev->parent = get_device(parent);
 	bsg_dev->release = ufs_bsg_node_release;
 
-	dev_set_name(bsg_dev, "ufs-bsg");
+	dev_set_name(bsg_dev, "ufs-bsg%d", shost->host_no);
 
 	ret = device_add(bsg_dev);
 	if (ret)