All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: tegra: Fix build error without CONFIG_DEBUG_FS
@ 2019-07-05 12:32 ` YueHaibing
  0 siblings, 0 replies; 8+ messages in thread
From: YueHaibing @ 2019-07-05 12:32 UTC (permalink / raw)
  To: linus.walleij, bgolaszewski, thierry.reding, jonathanh
  Cc: linux-kernel, linux-gpio, linux-tegra, YueHaibing

If CONFIG_DEBUG_FS is not set, building fails:

drivers/gpio/gpio-tegra.c: In function tegra_gpio_probe:
drivers/gpio/gpio-tegra.c:665:2: error: implicit declaration of function debugfs_create_file;
 did you mean bus_create_file? [-Werror=implicit-function-declaration]
  debugfs_create_file("tegra_gpio", 0444, NULL, tgi,
  ^~~~~~~~~~~~~~~~~~~
  bus_create_file
drivers/gpio/gpio-tegra.c:666:9: error: tegra_dbg_gpio_fops undeclared (first use in this function);
 did you mean tegra_gpio_pm_ops?
        &tegra_dbg_gpio_fops);
         ^~~~~~~~~~~~~~~~~~~
         tegra_gpio_pm_ops

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: a4de43049a1d ("gpio: tegra: Clean-up debugfs initialisation")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpio/gpio-tegra.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 59b99d8..40fd6bd 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -662,8 +662,10 @@ static int tegra_gpio_probe(struct platform_device *pdev)
 		}
 	}
 
+#ifdef CONFIG_DEBUG_FS
 	debugfs_create_file("tegra_gpio", 0444, NULL, tgi,
 			    &tegra_dbg_gpio_fops);
+#endif
 
 	return 0;
 }
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-07-06 22:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-05 12:32 [PATCH] gpio: tegra: Fix build error without CONFIG_DEBUG_FS YueHaibing
2019-07-05 12:32 ` YueHaibing
2019-07-05 12:40 ` Bartosz Golaszewski
2019-07-05 12:44   ` Yuehaibing
2019-07-05 12:44     ` Yuehaibing
2019-07-05 12:56     ` Bartosz Golaszewski
2019-07-05 12:59       ` Bartosz Golaszewski
2019-07-06 22:34         ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.