summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorJon Hunter <jonathanh@nvidia.com>2019-06-26 15:42:58 +0200
committerLinus Walleij <linus.walleij@linaro.org>2019-06-27 18:25:07 +0200
commita4de43049a1d0e2ed2a1d95e18e74b82cd9ca058 (patch)
tree941b0f72a958f1297aaae56b4680c1d18b01582f /drivers/gpio
parentMerge tag 'gpio-v5.3-updates-for-linus' of git://git.kernel.org/pub/scm/linux... (diff)
downloadlinux-a4de43049a1d0e2ed2a1d95e18e74b82cd9ca058.tar.xz
linux-a4de43049a1d0e2ed2a1d95e18e74b82cd9ca058.zip
gpio: tegra: Clean-up debugfs initialisation
The function tegra_gpio_debuginit() just calls debugfs_create_file() and given that there is already a stub function implemented for debugfs_create_file() when CONFIG_DEBUG_FS is not enabled, there is no need for the function tegra_gpio_debuginit() and so remove it. Finally, use a space and not a tab between the #ifdef and CONFIG_DEBUG_FS. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> 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, 3 insertions, 15 deletions
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index a54bba1bda6c..250f39fc5adf 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,19 +547,6 @@ 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 = {
@@ -684,7 +671,8 @@ static int tegra_gpio_probe(struct platform_device *pdev)
}
}
- tegra_gpio_debuginit(tgi);
+ debugfs_create_file("tegra_gpio", 0444, NULL, tgi,
+ &tegra_dbg_gpio_fops);
return 0;
}