diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-20 14:32:04 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-10-20 14:32:04 +0300 |
commit | 1f281e3ece26776e20ead4047f4956891cf179ea (patch) | |
tree | 950e3ceccb535e5ecfec00379a0c91945d802652 /src | |
parent | e5015624453d81d34ab049654e1af5f01e318f54 (diff) |
Unload adapter drivers on adapter removal instead of adapter_stop
Diffstat (limited to 'src')
-rw-r--r-- | src/adapter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/adapter.c b/src/adapter.c index 7dabf0bc..bb58928e 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2678,8 +2678,6 @@ int adapter_stop(struct btd_adapter *adapter) adapter->mode = MODE_OFF; adapter->state = DISCOVER_TYPE_NONE; - unload_drivers(adapter); - info("Adapter %s has been disabled", adapter->path); return 0; @@ -2791,6 +2789,8 @@ void adapter_remove(struct btd_adapter *adapter) debug("Removing adapter %s", path); + unload_drivers(adapter); + for (l = adapter->devices; l; l = l->next) device_remove(connection, l->data); g_slist_free(adapter->devices); |