diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-07-16 09:12:12 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-07-17 13:48:30 -0400 |
commit | cd1b44255c498d122220f5280c6cdbf7749c764b (patch) | |
tree | 2f44d672e8969976f05529172b35905dbfb378ad /drivers/bluetooth | |
parent | 9f2aee848fe60325b1984653833d2d1825ec730d (diff) |
Bluetooth: Use delayed init for Three-wire UART
This patch takes into use the delayed initialization feature that the
Bluetooth UART framework provides.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/hci_h5.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c index 022a6bcb4323..3c0e17b4602d 100644 --- a/drivers/bluetooth/hci_h5.c +++ b/drivers/bluetooth/hci_h5.c | |||
@@ -138,6 +138,8 @@ static int h5_open(struct hci_uart *hu) | |||
138 | h5->timer.function = h5_timed_event; | 138 | h5->timer.function = h5_timed_event; |
139 | h5->timer.data = (unsigned long) hu; | 139 | h5->timer.data = (unsigned long) hu; |
140 | 140 | ||
141 | set_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags); | ||
142 | |||
141 | /* Send initial sync request */ | 143 | /* Send initial sync request */ |
142 | h5_link_control(hu, sync, sizeof(sync)); | 144 | h5_link_control(hu, sync, sizeof(sync)); |
143 | mod_timer(&h5->timer, jiffies + H5_SYNC_TIMEOUT); | 145 | mod_timer(&h5->timer, jiffies + H5_SYNC_TIMEOUT); |
@@ -229,6 +231,7 @@ static void h5_handle_internal_rx(struct hci_uart *hu) | |||
229 | h5_link_control(hu, conf_req, 3); | 231 | h5_link_control(hu, conf_req, 3); |
230 | } else if (memcmp(data, conf_rsp, 2) == 0) { | 232 | } else if (memcmp(data, conf_rsp, 2) == 0) { |
231 | BT_DBG("Three-wire init sequence complete"); | 233 | BT_DBG("Three-wire init sequence complete"); |
234 | hci_uart_init_ready(hu); | ||
232 | return; | 235 | return; |
233 | } else { | 236 | } else { |
234 | BT_DBG("Link Control: 0x%02hhx 0x%02hhx", data[0], data[1]); | 237 | BT_DBG("Link Control: 0x%02hhx 0x%02hhx", data[0], data[1]); |