mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
spi: dw: Make debugfs name unique between instances
[ Upstream commit 13288bdf4a ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
dc19e98eb8
commit
152684089e
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user