Now when Android provide bdaddr in all hfp calls we can remove find_defaul_device. We can use bdaddr to find device on the device queue. --- android/handsfree.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/android/handsfree.c b/android/handsfree.c index 9bb8f43..2c7d53d 100644 --- a/android/handsfree.c +++ b/android/handsfree.c @@ -273,13 +273,6 @@ static void device_destroy(struct hf_device *dev) free(dev); } -static struct hf_device *find_default_device(void) -{ - /* TODO should be replaced by find_device() eventually */ - - return queue_peek_head(devices); -} - static bool match_by_bdaddr(const void *data, const void *match_data) { const struct hf_device *dev = data; @@ -290,8 +283,6 @@ static bool match_by_bdaddr(const void *data, const void *match_data) static struct hf_device *find_device(const bdaddr_t *bdaddr) { - if (!bacmp(bdaddr, BDADDR_ANY)) - return find_default_device(); return queue_find(devices, match_by_bdaddr, bdaddr); } -- 1.8.4 -- 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