All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
To: <linux-bluetooth@vger.kernel.org>
Cc: Andrzej Kaczmarek <andrzej.kaczmarek@tieto.com>
Subject: [PATCH 6/7] proximity: Remove list of adapter devices
Date: Fri, 31 Aug 2012 14:48:32 +0200	[thread overview]
Message-ID: <1346417314-25109-7-git-send-email-andrzej.kaczmarek@tieto.com> (raw)
In-Reply-To: <1346417314-25109-1-git-send-email-andrzej.kaczmarek@tieto.com>

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


  parent reply	other threads:[~2012-08-31 12:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-31 12:48 [PATCH 0/7] RFC: proximity cleanup Andrzej Kaczmarek
2012-08-31 12:48 ` [PATCH 1/7] proximity: Change adapter driver function names Andrzej Kaczmarek
2012-08-31 12:48 ` [PATCH 2/7] proximity: Remove unused definitions Andrzej Kaczmarek
2012-08-31 12:48 ` [PATCH 3/7] proximity: Simplify DBusConnection object usage Andrzej Kaczmarek
2012-08-31 12:48 ` [PATCH 4/7] proximity: Move reporter device driver registration to manager Andrzej Kaczmarek
2012-08-31 12:48 ` [PATCH 5/7] proximity: Remove unnecessary check for GATT enabled Andrzej Kaczmarek
2012-08-31 12:48 ` Andrzej Kaczmarek [this message]
2012-08-31 12:48 ` [PATCH 7/7] proximity: Remove reporter_adapter Andrzej Kaczmarek
2012-08-31 16:17 ` [PATCH 0/7] RFC: proximity cleanup Anderson Lizardo
2012-09-03  7:36   ` Andrzej Kaczmarek
2012-09-03 11:33     ` Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1346417314-25109-7-git-send-email-andrzej.kaczmarek@tieto.com \
    --to=andrzej.kaczmarek@tieto.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.