[svn-commits] tzafrir: linux/trunk r5987 - /linux/trunk/drivers/dahdi/xpp/xproto.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Feb 9 00:03:25 CST 2009
Author: tzafrir
Date: Mon Feb 9 00:03:25 2009
New Revision: 5987
URL: http://svn.digium.com/svn-view/dahdi?view=rev&rev=5987
Log:
Fix building DAHDI with module unloading disabled
As moduel_refcount is only used for debugging, disable it in this
non-common case.
(Closes issue #14402)
Modified:
linux/trunk/drivers/dahdi/xpp/xproto.c
Modified: linux/trunk/drivers/dahdi/xpp/xproto.c
URL: http://svn.digium.com/svn-view/dahdi/linux/trunk/drivers/dahdi/xpp/xproto.c?view=diff&rev=5987&r1=5986&r2=5987
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xproto.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xproto.c Mon Feb 9 00:03:25 2009
@@ -93,7 +93,9 @@
}
if(xtable) {
BUG_ON(!xtable->owner);
+#ifdef CONFIG_MODULE_UNLOAD
DBG(GENERAL, "%s refcount was %d\n", xtable->name, module_refcount(xtable->owner));
+#endif
if(!try_module_get(xtable->owner)) {
ERR("%s: try_module_get for %s failed.\n", __FUNCTION__, xtable->name);
return NULL;
@@ -105,8 +107,10 @@
void xproto_put(const xproto_table_t *xtable)
{
BUG_ON(!xtable);
+#ifdef CONFIG_MODULE_UNLOAD
DBG(GENERAL, "%s refcount was %d\n", xtable->name, module_refcount(xtable->owner));
BUG_ON(module_refcount(xtable->owner) <= 0);
+#endif
module_put(xtable->owner);
}
More information about the svn-commits
mailing list