projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
57a065f
)
Abort driver matching if probe succeeds
author
Marcel Holtmann
<marcel@holtmann.org>
Sun, 10 Aug 2008 10:24:19 +0000
(12:24 +0200)
committer
Marcel Holtmann
<marcel@holtmann.org>
Sun, 10 Aug 2008 10:24:19 +0000
(12:24 +0200)
src/element.c
patch
|
blob
|
history
diff --git
a/src/element.c
b/src/element.c
index
8996f3b
..
d954b63
100644
(file)
--- a/
src/element.c
+++ b/
src/element.c
@@
-746,12
+746,12
@@
static void register_element(gpointer data, gpointer user_data)
DBG("driver %p name %s", driver, driver->name);
DBG("driver %p name %s", driver, driver->name);
- if (driver->probe(element)
< 0)
- con
tinue
;
-
-
connman_element_
lock(element);
-
element->driver = driver
;
- connman_element_unlock(element);
+ if (driver->probe(element)
== 0) {
+ con
nman_element_lock(element)
;
+ element->driver = driver;
+
connman_element_un
lock(element);
+
break
;
+ }
}
g_static_rw_lock_writer_unlock(&element_lock);
}
g_static_rw_lock_writer_unlock(&element_lock);