diff options
author | Phil Reid <preid@electromag.com.au> | 2016-12-22 17:18:12 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-11 09:30:12 -0700 |
commit | 6fdd650e61776c7d6ad6176fc4f69e8e98dc2520 (patch) | |
tree | e6f9b77c68a7165c3986faf515c3bdc0d0f73049 /drivers/spi | |
parent | 72fafee16367d3c4782dd3f6869b297a91d7cee0 (diff) | |
download | linux-stable-6fdd650e61776c7d6ad6176fc4f69e8e98dc2520.tar.gz linux-stable-6fdd650e61776c7d6ad6176fc4f69e8e98dc2520.tar.bz2 linux-stable-6fdd650e61776c7d6ad6176fc4f69e8e98dc2520.zip |
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>
Diffstat (limited to 'drivers/spi')
-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 1a0f266c4268..0f08d11d86d2 100644 --- a/drivers/spi/spi-dw.c +++ b/drivers/spi/spi-dw.c @@ -118,7 +118,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; |