summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-dw.c
diff options
context:
space:
mode:
authorPhil Reid2016-12-22 10:18:12 +0100
committerMark Brown2016-12-31 19:51:03 +0100
commit13288bdf4adbaa6bd1267f10044c1bc25d90ce7f (patch)
tree1e5d377fa2b542e5b1f01ac35025e1d33598f05f /drivers/spi/spi-dw.c
parentMerge remote-tracking branches 'spi/topic/spidev', 'spi/topic/sunxi', 'spi/to... (diff)
downloadkernel-qcow2-linux-13288bdf4adbaa6bd1267f10044c1bc25d90ce7f.tar.gz
kernel-qcow2-linux-13288bdf4adbaa6bd1267f10044c1bc25d90ce7f.tar.xz
kernel-qcow2-linux-13288bdf4adbaa6bd1267f10044c1bc25d90ce7f.zip
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>
Diffstat (limited to 'drivers/spi/spi-dw.c')
-rw-r--r--drivers/spi/spi-dw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index b715a26a9148..054012f87567 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -107,7 +107,10 @@ static const struct file_operations dw_spi_regs_ops = {
static int dw_spi_debugfs_init(struct dw_spi *dws)
{
- dws->debugfs = debugfs_create_dir("dw_spi", NULL);
+ char name[128];
+
+ snprintf(name, 128, "dw_spi-%s", dev_name(&dws->master->dev));
+ dws->debugfs = debugfs_create_dir(name, NULL);
if (!dws->debugfs)
return -ENOMEM;