From: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
To: linux-bluetooth@vger.kernel.org
Cc: Lukasz Rymanowski <lukasz.rymanowski@tieto.com>
Subject: [PATCH 3/3] android/handsfree: Remove find default device
Date: Thu, 13 Nov 2014 16:52:52 +0100 [thread overview]
Message-ID: <1415893972-18656-4-git-send-email-lukasz.rymanowski@tieto.com> (raw)
In-Reply-To: <1415893972-18656-1-git-send-email-lukasz.rymanowski@tieto.com>
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
next prev parent reply other threads:[~2014-11-13 15:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-13 15:52 [PATCH 0/3] android/handsfree: Support multiply devices Lukasz Rymanowski
2014-11-13 15:52 ` [PATCH 1/3] android/handsfree: Send indicator notif to all connected devices Lukasz Rymanowski
2014-11-13 17:14 ` Szymon Janc
2014-11-13 17:24 ` Szymon Janc
2014-11-13 15:52 ` [PATCH 2/3] android/handsfree: Send phone state " Lukasz Rymanowski
2014-11-13 15:52 ` Lukasz Rymanowski [this message]
2014-11-13 15:58 ` [PATCH 3/3] android/handsfree: Remove find default device Lukasz Rymanowski
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=1415893972-18656-4-git-send-email-lukasz.rymanowski@tieto.com \
--to=lukasz.rymanowski@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox