From: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 1/2] android/hal: Use defined function to check that interface is ready
Date: Fri, 25 Oct 2013 16:28:45 +0300 [thread overview]
Message-ID: <1382707726-20118-1-git-send-email-Andrei.Emeltchenko.news@gmail.com> (raw)
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
android/hal-bluetooth.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c
index 894f5b5..282a680 100644
--- a/android/hal-bluetooth.c
+++ b/android/hal-bluetooth.c
@@ -78,10 +78,15 @@ void bt_thread_disassociate(void)
bt_hal_cbacks->thread_evt_cb(DISASSOCIATE_JVM);
}
+static bool interface_ready(void)
+{
+ return bt_hal_cbacks != NULL;
+}
+
/* will be called from notification thread context */
void bt_notify_adapter(uint16_t opcode, void *buf, uint16_t len)
{
- if (!bt_hal_cbacks)
+ if (!interface_ready())
return;
switch (opcode) {
@@ -97,11 +102,6 @@ void bt_notify_adapter(uint16_t opcode, void *buf, uint16_t len)
}
}
-static bool interface_ready(void)
-{
- return bt_hal_cbacks != NULL;
-}
-
static int init(bt_callbacks_t *callbacks)
{
struct hal_cmd_register_module cmd;
--
1.7.10.4
next reply other threads:[~2013-10-25 13:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 13:28 Andrei Emeltchenko [this message]
2013-10-25 13:28 ` [PATCH 2/2] android/hal: Use debug helpers from hal client Andrei Emeltchenko
2013-10-27 11:21 ` [PATCH 1/2] android/hal: Use defined function to check that interface is ready Luiz Augusto von Dentz
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=1382707726-20118-1-git-send-email-Andrei.Emeltchenko.news@gmail.com \
--to=andrei.emeltchenko.news@gmail.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