]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
spi: dw: Make debugfs name unique between instances
authorPhil Reid <preid@electromag.com.au>
Thu, 22 Dec 2016 09:18:12 +0000 (17:18 +0800)
committerMark Brown <broonie@kernel.org>
Sat, 31 Dec 2016 18:51:03 +0000 (18:51 +0000)
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>
drivers/spi/spi-dw.c

index b715a26a91484fb695088459d9249b367b334fe1..054012f875671b995141f8c549021389f21f454f 100644 (file)
@@ -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;