From dc3382332f7d53ea44429b30cd9523ead9881217 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Mon, 9 Feb 2009 06:03:25 +0000 Subject: 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) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5987 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/xpp/xproto.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/dahdi') diff --git a/drivers/dahdi/xpp/xproto.c b/drivers/dahdi/xpp/xproto.c index 3b454b1..bf51f23 100644 --- a/drivers/dahdi/xpp/xproto.c +++ b/drivers/dahdi/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