Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: dw: Make debugfs name unique between instances

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>

authored by

Phil Reid and committed by
Mark Brown
13288bdf fafd6794

+4 -1
+4 -1
drivers/spi/spi-dw.c
··· 107 107 108 108 static int dw_spi_debugfs_init(struct dw_spi *dws) 109 109 { 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); 111 114 if (!dws->debugfs) 112 115 return -ENOMEM; 113 116