linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Suraj Sumangala <suraj@atheros.com>
To: <linux-bluetooth@vger.kernel.org>
Cc: <Jothikumar.Mothilal@Atheros.com>, Suraj Sumangala <suraj@atheros.com>
Subject: [PATCH 1/2] Bluetooth: hci open callback for hci UART transport driver
Date: Tue, 21 Sep 2010 19:03:00 +0530	[thread overview]
Message-ID: <1285075981-8941-1-git-send-email-suraj@atheros.com> (raw)

This patch provides option for hci transport driver protocol implementation
to have a callback for hci open.

Signed-off-by: Suraj Sumangala <suraj@atheros.com>
---
 drivers/bluetooth/hci_ldisc.c |    5 ++++-
 drivers/bluetooth/hci_uart.h  |    1 +
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 998833d..5e02501 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -162,9 +162,12 @@ restart:
 /* Initialize device */
 static int hci_uart_open(struct hci_dev *hdev)
 {
+	struct hci_uart *hu  = (struct hci_uart *) hdev->driver_data;
+
 	BT_DBG("%s %p", hdev->name, hdev);
 
-	/* Nothing to do for UART driver */
+	if (hu->proto->hci_open)
+		hu->proto->hci_open(hu);
 
 	set_bit(HCI_RUNNING, &hdev->flags);
 
diff --git a/drivers/bluetooth/hci_uart.h b/drivers/bluetooth/hci_uart.h
index 99fb352..d0198ec 100644
--- a/drivers/bluetooth/hci_uart.h
+++ b/drivers/bluetooth/hci_uart.h
@@ -51,6 +51,7 @@ struct hci_uart;
 struct hci_uart_proto {
 	unsigned int id;
 	int (*open)(struct hci_uart *hu);
+	int (*hci_open)(struct hci_uart *hu);
 	int (*close)(struct hci_uart *hu);
 	int (*flush)(struct hci_uart *hu);
 	int (*recv)(struct hci_uart *hu, void *data, int len);
-- 
1.7.0.4


             reply	other threads:[~2010-09-21 13:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-21 13:33 Suraj Sumangala [this message]
2010-09-21 13:33 ` [PATCH 2/2] Bluetooth: support to send power management enable during hci open Suraj Sumangala
2010-09-21 19:52   ` Pavan Savoy
2010-09-22  4:01     ` Suraj Sumangala
2010-09-22 21:22       ` Pavan Savoy
2010-09-23  4:13         ` Suraj Sumangala
2010-09-30  8:31 ` [PATCH 1/2] Bluetooth: hci open callback for hci UART transport driver Suraj Sumangala
2010-10-04 17:29   ` Suraj Sumangala
2010-10-05  9:27 ` Marcel Holtmann

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=1285075981-8941-1-git-send-email-suraj@atheros.com \
    --to=suraj@atheros.com \
    --cc=Jothikumar.Mothilal@Atheros.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;
as well as URLs for NNTP newsgroup(s).