Skip to content

Commit 1526840

Browse files
reid-pgregkh
authored andcommitted
spi: dw: Make debugfs name unique between instances
[ Upstream commit 13288bdf4adbaa6bd1267f10044c1bc25d90ce7f ] Some system have multiple dw devices. Currently the driver uses a fixed name for the debugfs dir. Append dev name to the debugfs dir name to make it unique. Signed-off-by: Phil Reid <preid@electromag.com.au> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent dc19e98 commit 1526840

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/spi/spi-dw.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ static const struct file_operations dw_spi_regs_ops = {
107107

108108
static int dw_spi_debugfs_init(struct dw_spi *dws)
109109
{
110-
dws->debugfs = debugfs_create_dir("dw_spi", NULL);
110+
char name[128];
111+
112+
snprintf(name, 128, "dw_spi-%s", dev_name(&dws->master->dev));
113+
dws->debugfs = debugfs_create_dir(name, NULL);
111114
if (!dws->debugfs)
112115
return -ENOMEM;
113116

0 commit comments

Comments
 (0)