diff options
author | Jon Hunter <jonathanh@nvidia.com> | 2019-06-26 09:42:58 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-06-27 12:25:07 -0400 |
commit | a4de43049a1d0e2ed2a1d95e18e74b82cd9ca058 (patch) | |
tree | 941b0f72a958f1297aaae56b4680c1d18b01582f /drivers/gpio/gpio-tegra.c | |
parent | da6070fc558e3b5d7fe0cabcbec6487a1999c76d (diff) |
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/gpio-tegra.c')
-rw-r--r-- | drivers/gpio/gpio-tegra.c | 18 |
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) | |||
517 | } | 517 | } |
518 | #endif | 518 | #endif |
519 | 519 | ||
520 | #ifdef CONFIG_DEBUG_FS | 520 | #ifdef CONFIG_DEBUG_FS |
521 | 521 | ||
522 | #include <linux/debugfs.h> | 522 | #include <linux/debugfs.h> |
523 | #include <linux/seq_file.h> | 523 | #include <linux/seq_file.h> |
@@ -547,19 +547,6 @@ static int tegra_dbg_gpio_show(struct seq_file *s, void *unused) | |||
547 | } | 547 | } |
548 | 548 | ||
549 | DEFINE_SHOW_ATTRIBUTE(tegra_dbg_gpio); | 549 | DEFINE_SHOW_ATTRIBUTE(tegra_dbg_gpio); |
550 | |||
551 | static void tegra_gpio_debuginit(struct tegra_gpio_info *tgi) | ||
552 | { | ||
553 | debugfs_create_file("tegra_gpio", 0444, NULL, tgi, | ||
554 | &tegra_dbg_gpio_fops); | ||
555 | } | ||
556 | |||
557 | #else | ||
558 | |||
559 | static inline void tegra_gpio_debuginit(struct tegra_gpio_info *tgi) | ||
560 | { | ||
561 | } | ||
562 | |||
563 | #endif | 550 | #endif |
564 | 551 | ||
565 | static const struct dev_pm_ops tegra_gpio_pm_ops = { | 552 | static const struct dev_pm_ops tegra_gpio_pm_ops = { |
@@ -684,7 +671,8 @@ static int tegra_gpio_probe(struct platform_device *pdev) | |||
684 | } | 671 | } |
685 | } | 672 | } |
686 | 673 | ||
687 | tegra_gpio_debuginit(tgi); | 674 | debugfs_create_file("tegra_gpio", 0444, NULL, tgi, |
675 | &tegra_dbg_gpio_fops); | ||
688 | 676 | ||
689 | return 0; | 677 | return 0; |
690 | } | 678 | } |