[dahdi-commits] sruffell: branch linux/sruffell/dahdi-linux-refcounts r6767 - /linux/team/sru...
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Fri Jun 26 10:19:03 CDT 2009
Author: sruffell
Date: Fri Jun 26 10:18:58 2009
New Revision: 6767
URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=6767
Log:
refcounts-wip: Use the owner member from the original dahdi_echocan_factory.
Modified:
linux/team/sruffell/dahdi-linux-refcounts/drivers/dahdi/dahdi-base.c
Modified: linux/team/sruffell/dahdi-linux-refcounts/drivers/dahdi/dahdi-base.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/team/sruffell/dahdi-linux-refcounts/drivers/dahdi/dahdi-base.c?view=diff&rev=6767&r1=6766&r2=6767
==============================================================================
--- linux/team/sruffell/dahdi-linux-refcounts/drivers/dahdi/dahdi-base.c (original)
+++ linux/team/sruffell/dahdi-linux-refcounts/drivers/dahdi/dahdi-base.c Fri Jun 26 10:18:58 2009
@@ -383,13 +383,16 @@
struct ecfactory {
const struct dahdi_echocan_factory *ec;
- struct module *owner;
struct list_head list;
};
int dahdi_register_echocan_factory(const struct dahdi_echocan_factory *ec)
{
struct ecfactory *cur;
+
+ WARN_ON(!ec->owner);
+ if (!ec->owner)
+ return -EINVAL;
write_lock(&ecfactory_list_lock);
@@ -1109,7 +1112,7 @@
list_for_each_entry(cur, &ecfactory_list, list) {
if (!strcmp(name_upper, cur->ec->name)) {
#ifdef USE_ECHOCAN_REFCOUNT
- if (try_module_get(cur->owner)) {
+ if (try_module_get(cur->ec->owner)) {
read_unlock(&ecfactory_list_lock);
return cur->ec;
} else {
More information about the dahdi-commits
mailing list