diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-02-09 06:03:25 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-02-09 06:03:25 +0000 |
commit | c2be2d2d42fdfc5d61a271d1218b6965aaeb44af (patch) | |
tree | f47514f6da70c36264ab83e9cc60ae5c557d3d2a | |
parent | ca93c1eea019e98acdcb20c2dd218bbe691b1a92 (diff) |
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
-rw-r--r-- | drivers/dahdi/xpp/xproto.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); } |