Commit a8c5fb1a authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Johan Hedberg

Bluetooth: Fix coding style in hci_core.c

Follow net subsystem rules.
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 5974e4c4
...@@ -124,7 +124,8 @@ static void hci_req_cancel(struct hci_dev *hdev, int err) ...@@ -124,7 +124,8 @@ static void hci_req_cancel(struct hci_dev *hdev, int err)
} }
/* Execute request and wait for completion. */ /* Execute request and wait for completion. */
static int __hci_request(struct hci_dev *hdev, void (*req)(struct hci_dev *hdev, unsigned long opt), static int __hci_request(struct hci_dev *hdev,
void (*req)(struct hci_dev *hdev, unsigned long opt),
unsigned long opt, __u32 timeout) unsigned long opt, __u32 timeout)
{ {
DECLARE_WAITQUEUE(wait, current); DECLARE_WAITQUEUE(wait, current);
...@@ -417,7 +418,8 @@ static void inquiry_cache_flush(struct hci_dev *hdev) ...@@ -417,7 +418,8 @@ static void inquiry_cache_flush(struct hci_dev *hdev)
INIT_LIST_HEAD(&cache->resolve); INIT_LIST_HEAD(&cache->resolve);
} }
struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr) struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev,
bdaddr_t *bdaddr)
{ {
struct discovery_state *cache = &hdev->discovery; struct discovery_state *cache = &hdev->discovery;
struct inquiry_entry *e; struct inquiry_entry *e;
...@@ -605,8 +607,7 @@ int hci_inquiry(void __user *arg) ...@@ -605,8 +607,7 @@ int hci_inquiry(void __user *arg)
hci_dev_lock(hdev); hci_dev_lock(hdev);
if (inquiry_cache_age(hdev) > INQUIRY_CACHE_AGE_MAX || if (inquiry_cache_age(hdev) > INQUIRY_CACHE_AGE_MAX ||
inquiry_cache_empty(hdev) || inquiry_cache_empty(hdev) || ir.flags & IREQ_CACHE_FLUSH) {
ir.flags & IREQ_CACHE_FLUSH) {
inquiry_cache_flush(hdev); inquiry_cache_flush(hdev);
do_inquiry = 1; do_inquiry = 1;
} }
...@@ -1283,8 +1284,7 @@ int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key, ...@@ -1283,8 +1284,7 @@ int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key,
* combination key for legacy pairing even when there's no * combination key for legacy pairing even when there's no
* previous key */ * previous key */
if (type == HCI_LK_CHANGED_COMBINATION && if (type == HCI_LK_CHANGED_COMBINATION &&
(!conn || conn->remote_auth == 0xff) && (!conn || conn->remote_auth == 0xff) && old_key_type == 0xff) {
old_key_type == 0xff) {
type = HCI_LK_COMBINATION; type = HCI_LK_COMBINATION;
if (conn) if (conn)
conn->key_type = type; conn->key_type = type;
...@@ -1752,7 +1752,8 @@ int hci_register_dev(struct hci_dev *hdev) ...@@ -1752,7 +1752,8 @@ int hci_register_dev(struct hci_dev *hdev)
goto err_wqueue; goto err_wqueue;
hdev->rfkill = rfkill_alloc(hdev->name, &hdev->dev, hdev->rfkill = rfkill_alloc(hdev->name, &hdev->dev,
RFKILL_TYPE_BLUETOOTH, &hci_rfkill_ops, hdev); RFKILL_TYPE_BLUETOOTH, &hci_rfkill_ops,
hdev);
if (hdev->rfkill) { if (hdev->rfkill) {
if (rfkill_register(hdev->rfkill) < 0) { if (rfkill_register(hdev->rfkill) < 0) {
rfkill_destroy(hdev->rfkill); rfkill_destroy(hdev->rfkill);
...@@ -2244,7 +2245,8 @@ EXPORT_SYMBOL(hci_send_sco); ...@@ -2244,7 +2245,8 @@ EXPORT_SYMBOL(hci_send_sco);
/* ---- HCI TX task (outgoing data) ---- */ /* ---- HCI TX task (outgoing data) ---- */
/* HCI Connection scheduler */ /* HCI Connection scheduler */
static inline struct hci_conn *hci_low_sent(struct hci_dev *hdev, __u8 type, int *quote) static inline struct hci_conn *hci_low_sent(struct hci_dev *hdev, __u8 type,
int *quote)
{ {
struct hci_conn_hash *h = &hdev->conn_hash; struct hci_conn_hash *h = &hdev->conn_hash;
struct hci_conn *conn = NULL, *c; struct hci_conn *conn = NULL, *c;
...@@ -2708,7 +2710,8 @@ static inline void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb) ...@@ -2708,7 +2710,8 @@ static inline void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)
flags = hci_flags(handle); flags = hci_flags(handle);
handle = hci_handle(handle); handle = hci_handle(handle);
BT_DBG("%s len %d handle 0x%x flags 0x%x", hdev->name, skb->len, handle, flags); BT_DBG("%s len %d handle 0x%x flags 0x%x", hdev->name, skb->len,
handle, flags);
hdev->stat.acl_rx++; hdev->stat.acl_rx++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment