[PATCH 6/7] proximity: Remove list of adapter devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



List of adapter devices is only used to remove them when adapter is removed.
There's no need to do this since devices will be removed before adapter is
removed anyway.
---
 profiles/proximity/reporter.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/profiles/proximity/reporter.c b/profiles/proximity/reporter.c
index 9b430f7..cf52548 100644
--- a/profiles/proximity/reporter.c
+++ b/profiles/proximity/reporter.c
@@ -51,7 +51,6 @@
 
 struct reporter_adapter {
 	struct btd_adapter *adapter;
-	GSList *devices;
 };
 
 static GSList *reporter_adapters;
@@ -192,7 +191,6 @@ static const GDBusSignalTable reporter_signals[] = {
 static void unregister_reporter_device(gpointer data, gpointer user_data)
 {
 	struct btd_device *device = data;
-	struct reporter_adapter *radapter = user_data;
 	const char *path = device_get_path(device);
 
 	DBG("unregister on device %s", path);
@@ -200,7 +198,6 @@ static void unregister_reporter_device(gpointer data, gpointer user_data)
 	g_dbus_unregister_interface(get_dbus_connection(), path,
 					PROXIMITY_REPORTER_INTERFACE);
 
-	radapter->devices = g_slist_remove(radapter->devices, device);
 	btd_device_unref(device);
 }
 
@@ -217,7 +214,6 @@ static void register_reporter_device(struct btd_device *device,
 					NULL, device, NULL);
 
 	btd_device_ref(device);
-	radapter->devices = g_slist_prepend(radapter->devices, device);
 }
 
 int reporter_device_probe(struct btd_device *device, GSList *uuids)
@@ -268,9 +264,6 @@ void reporter_adapter_remove(struct btd_adapter *adapter)
 	if (!radapter)
 		return;
 
-	g_slist_foreach(radapter->devices, unregister_reporter_device,
-								radapter);
-
 	link_loss_unregister(adapter);
 	imm_alert_unregister(adapter);
 
-- 
1.7.11.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux