Author: marek Date: 2010-05-22 09:32:41 +0200 (Sat, 22 May 2010) New Revision: 1679
Modified: trunk/batman-adv-kernelland/bat_debugfs.c Log: batman-adv: Only fail in debugfs when kernel has debugfs support
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
Modified: trunk/batman-adv-kernelland/bat_debugfs.c =================================================================== --- trunk/batman-adv-kernelland/bat_debugfs.c 2010-05-22 05:13:51 UTC (rev 1678) +++ trunk/batman-adv-kernelland/bat_debugfs.c 2010-05-22 07:32:41 UTC (rev 1679) @@ -141,7 +141,11 @@ 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)