[RFC 3/5] android/health: Fix deleting channels queue

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

 



Channels queue is created only on device creation. So do not destroy
queue on all mdls deleted in mdl_deleted_cb, just remove all entries.
---
 android/health.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/android/health.c b/android/health.c
index 3afdf9b..717e9a6 100644
--- a/android/health.c
+++ b/android/health.c
@@ -1088,8 +1088,8 @@ static void mcap_mdl_deleted_cb(struct mcap_mdl *mdl, void *data)
 	/* mdl == NULL means, delete all mdls */
 	if (!mdl) {
 		queue_foreach(dev->channels, notify_channel, NULL);
-		queue_destroy(dev->channels, free_health_channel);
-		dev->channels = NULL;
+		queue_remove_all(dev->channels, NULL, NULL,
+						free_health_channel);
 		return;
 	}
 
-- 
1.9.1

--
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