From 4c4a43fea3872b69c695573def36b1c146ee6712 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 5 Jan 2009 23:03:35 +0100 Subject: Don't probe device drivers twice --- src/device.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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; -- cgit v1.2.3