summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-01-05 23:03:35 +0100
committerMarcel Holtmann <marcel@holtmann.org>2009-01-05 23:03:35 +0100
commit4c4a43fea3872b69c695573def36b1c146ee6712 (patch)
tree7bb60a96c13ddd51142ad03da80a5d7c75e4795e
parentd333a3b050767ef8b89b3a9e04ef7723cbcf8e0a (diff)
downloadconnman-4c4a43fea3872b69c695573def36b1c146ee6712.tar.gz
connman-4c4a43fea3872b69c695573def36b1c146ee6712.tar.bz2
connman-4c4a43fea3872b69c695573def36b1c146ee6712.zip
Don't probe device drivers twice
-rw-r--r--src/device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index 5bfd8e53..a3bbd895 100644
--- a/src/device.c
+++ b/src/device.c
@@ -551,6 +551,9 @@ static void probe_driver(struct connman_element *element, gpointer user_data)
if (element->device == NULL)
return;
+ if (element->device->driver != NULL)
+ return;
+
if (driver->probe(element->device) < 0)
return;
@@ -1205,6 +1208,9 @@ static int device_probe(struct connman_element *element)
if (device == NULL)
return -ENODEV;
+ if (device->driver != NULL)
+ return -EALREADY;
+
for (list = driver_list; list; list = list->next) {
struct connman_device_driver *driver = list->data;