public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: Only fail in debugfs when kernel has debugfs support
@ 2010-05-22 11:58 Sven Eckelmann
  2010-05-22 12:56 ` Marek Lindner
  0 siblings, 1 reply; 2+ messages in thread
From: Sven Eckelmann @ 2010-05-22 11:58 UTC (permalink / raw)
  To: b.a.t.m.a.n

Linux allows to call debugfs related functions even when it is not
compiled in. The return codes will always be failure return codes and we
would fail to load the batman-adv module even when debugfs isn't a hard
dependency.

We can simply return a success error code when the debugfs stub returned
a error code and the kernel was compiled without debugfs support.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
 batman-adv-kernelland/bat_debugfs.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/batman-adv-kernelland/bat_debugfs.c b/batman-adv-kernelland/bat_debugfs.c
index 9113601..bc1591f 100644
--- a/batman-adv-kernelland/bat_debugfs.c
+++ b/batman-adv-kernelland/bat_debugfs.c
@@ -141,7 +141,11 @@ rem_attr:
 	debugfs_remove_recursive(bat_priv->debug_dir);
 	bat_priv->debug_dir = NULL;
 out:
+#ifdef CONFIG_DEBUG_FS
 	return -ENOMEM;
+#else
+	return 0;
+#endif /* CONFIG_DEBUG_FS */
 }
 
 void debugfs_del_meshif(struct net_device *dev)
-- 
1.7.1


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

end of thread, other threads:[~2010-05-22 12:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-22 11:58 [B.A.T.M.A.N.] [PATCH] batman-adv: Only fail in debugfs when kernel has debugfs support Sven Eckelmann
2010-05-22 12:56 ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox