summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-07-06 20:15:54 +0200
committerLinus Walleij <linus.walleij@linaro.org>2019-07-06 20:16:17 +0200
commit9b3b623804a67d2274ee372c1587926ab0275833 (patch)
tree3c2aa9b32d8061f90d0b172a044b026b06cb2149 /drivers/gpio
parentgpiolib: Use spinlock_t instead of struct spinlock (diff)
downloadlinux-9b3b623804a67d2274ee372c1587926ab0275833.tar.xz
linux-9b3b623804a67d2274ee372c1587926ab0275833.zip
Revert "gpio: tegra: Clean-up debugfs initialisation"
This reverts commit a4de43049a1d0e2ed2a1d95e18e74b82cd9ca058. The commit creates build errors. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-tegra.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 250f39fc5adf..a54bba1bda6c 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -517,7 +517,7 @@ static int tegra_gpio_irq_set_wake(struct irq_data *d, unsigned int enable)
}
#endif
-#ifdef CONFIG_DEBUG_FS
+#ifdef CONFIG_DEBUG_FS
#include <linux/debugfs.h>
#include <linux/seq_file.h>
@@ -547,6 +547,19 @@ static int tegra_dbg_gpio_show(struct seq_file *s, void *unused)
}
DEFINE_SHOW_ATTRIBUTE(tegra_dbg_gpio);
+
+static void tegra_gpio_debuginit(struct tegra_gpio_info *tgi)
+{
+ debugfs_create_file("tegra_gpio", 0444, NULL, tgi,
+ &tegra_dbg_gpio_fops);
+}
+
+#else
+
+static inline void tegra_gpio_debuginit(struct tegra_gpio_info *tgi)
+{
+}
+
#endif
static const struct dev_pm_ops tegra_gpio_pm_ops = {
@@ -671,8 +684,7 @@ static int tegra_gpio_probe(struct platform_device *pdev)
}
}
- debugfs_create_file("tegra_gpio", 0444, NULL, tgi,
- &tegra_dbg_gpio_fops);
+ tegra_gpio_debuginit(tgi);
return 0;
}