From 62b0f742f8b8bebd57cbb43f96348afb11ee801a Mon Sep 17 00:00:00 2001 From: tzafrir Date: Mon, 9 Feb 2009 05:58:55 +0000 Subject: Fix building Zaptel with module unloading disabled As moduel_refcount is only used for debugging, disable it in this non-common case. (Issue #14402) git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4625 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- kernel/xpp/xproto.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/xpp/xproto.c b/kernel/xpp/xproto.c index ae6a9b2..05735e9 100644 --- a/kernel/xpp/xproto.c +++ b/kernel/xpp/xproto.c @@ -93,7 +93,9 @@ const xproto_table_t *xproto_get(xpd_type_t cardtype) } 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 @@ const xproto_table_t *xproto_get(xpd_type_t cardtype) 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); } -- cgit v1.2.3