From: Phil Reid Date: Thu, 22 Dec 2016 09:18:12 +0000 (+0800) Subject: spi: dw: Make debugfs name unique between instances X-Git-Tag: v4.14-rc1~1492^2~3^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13288bdf4adbaa6bd1267f10044c1bc25d90ce7f;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c index b715a26..054012f 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;