gpio: tegra: Clean-up debugfs initialisation
Subsystems (2)
Jon Hunter
maintainerPATCH 1/1 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.
--- drivers/gpio/gpio-tegra.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-)
drivers/gpio/gpio-tegra.c +3 -15
@@ -508,7 +508,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>
@@ -538,19 +538,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 = {
@@ -675,7 +662,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 ; }
Signature · 1 line
2.17.1
śr., 26 cze 2019 o 15:43 Jon Hunter <[email protected]> napisał(a):
Quoted 58 lines
The function
tegra_gpio_debuginit()just callsdebugfs_create_file()and given that there is already a stub function implemented fordebugfs_create_file()whenCONFIG_DEBUG_FSis not enabled, there is no need for the functiontegra_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 <[email protected]>--- drivers/gpio/gpio-tegra.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-)drivers/gpio/gpio-tegra.c +3
-16@@ -508,7 +508,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> @@ -538,19 +538,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 = {@@ -675,7 +662,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 ; } --
Quoted 2 lines
2.17.1
This depends on changes queued by Linus, so I'll let him pick it up directly.
Bart
Quoted 9 lines · Jon Hunter
The function
tegra_gpio_debuginit()just callsdebugfs_create_file()and given that there is already a stub function implemented fordebugfs_create_file()whenCONFIG_DEBUG_FSis not enabled, there is no need for the functiontegra_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 <[email protected]>
Patch applied with Bartosz review tag.
Yours,
Linus Walleij
Quoted 9 lines · Jon Hunter
The function
tegra_gpio_debuginit()just callsdebugfs_create_file()and given that there is already a stub function implemented fordebugfs_create_file()whenCONFIG_DEBUG_FSis not enabled, there is no need for the functiontegra_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 <[email protected]>
Sadly I've had to revert this commit because of build errors, but let's see if we can figure it out after the merge window.
Yours,
Linus Walleij
Jon Hunter
maintainerQuoted 7 lines · Linus Walleij
Quoted 5 lines · Jon Hunter
The function
tegra_gpio_debuginit()just callsdebugfs_create_file()and given that there is already a stub function implemented fordebugfs_create_file()whenCONFIG_DEBUG_FSis not enabled, there is no need for the functiontegra_gpio_debuginit()and so remove it.
Quoted 7 lines
Quoted 4 lines
Finally, use a space and not a tab between the #ifdef and
CONFIG_DEBUG_FS.Signed-off-by Jon Hunter <[email protected]>Sadly I've had to revert this commit because of build errors, but let's see if we can figure it out after the merge window.
Sorry about that. I will be more thorough in future.
Jon
Signature · 1 line
nvpublic
Quoted 6 lines · Jon Hunter
Quoted 2 lines · Linus Walleij
Sadly I've had to revert this commit because of build errors, but let's see if we can figure it out after the merge window.
Sorry about that. I will be more thorough in future.
Don't beat yourself up about it, happens all the time. I saw Arnd sent some suggested fixups BTW!
Yours,
Linus Walleij