diff options
author | Phil Reid <preid@electromag.com.au> | 2016-12-22 17:18:12 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-12-31 18:51:03 +0000 |
commit | 13288bdf4adbaa6bd1267f10044c1bc25d90ce7f (patch) | |
tree | 1e5d377fa2b542e5b1f01ac35025e1d33598f05f /drivers/spi/spi-dw.c | |
parent | fafd67940774733fa97f4b09412aea6981b82e0a (diff) | |
download | linux-stable-13288bdf4adbaa6bd1267f10044c1bc25d90ce7f.tar.gz linux-stable-13288bdf4adbaa6bd1267f10044c1bc25d90ce7f.tar.bz2 linux-stable-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.c | 5 |
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; |