From b028ebed661dfb9e07c9f80ef9057e8d4685ed7e Mon Sep 17 00:00:00 2001 From: Alok Barsode Date: Thu, 12 Jan 2012 15:13:39 +0200 Subject: [PATCH] technology: Assign driver to technology at creation time No need to assign driver to technolog during driver registration. --- src/technology.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/technology.c b/src/technology.c index 0f958d6..02ba6f3 100644 --- a/src/technology.c +++ b/src/technology.c @@ -93,24 +93,11 @@ static gint compare_priority(gconstpointer a, gconstpointer b) */ int connman_technology_driver_register(struct connman_technology_driver *driver) { - GSList *list; - struct connman_technology *technology; - - DBG("driver %p name %s", driver, driver->name); + DBG("Registering %s driver", driver->name); driver_list = g_slist_insert_sorted(driver_list, driver, compare_priority); - for (list = technology_list; list; list = list->next) { - technology = list->data; - - if (technology->driver != NULL) - continue; - - if (technology->type == driver->type) - technology->driver = driver; - } - return 0; } @@ -125,7 +112,7 @@ void connman_technology_driver_unregister(struct connman_technology_driver *driv GSList *list; struct connman_technology *technology; - DBG("driver %p name %s", driver, driver->name); + DBG("Unregistering driver %p name %s", driver, driver->name); for (list = technology_list; list; list = list->next) { technology = list->data; -- 2.7.4