]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/bluetooth/hci_h4.c
Merge branch 'core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[karo-tx-linux.git] / drivers / bluetooth / hci_h4.c
index ad62abbbb739ae797560fa26391d6afa2a04a2ff..b0fafb0559964762ee7db79a32dd336d34e2017b 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
-#include <linux/sched.h>
 #include <linux/types.h>
 #include <linux/fcntl.h>
 #include <linux/interrupt.h>
 
 #include "hci_uart.h"
 
-#ifndef CONFIG_BT_HCIUART_DEBUG
-#undef  BT_DBG
-#define BT_DBG( A... )
-#endif
-
 #define VERSION "1.2"
 
 struct h4_struct {
@@ -189,7 +183,7 @@ static int h4_recv(struct hci_uart *hu, void *data, int count)
                                continue;
 
                        case H4_W4_EVENT_HDR:
-                               eh = (struct hci_event_hdr *) h4->rx_skb->data;
+                               eh = hci_event_hdr(h4->rx_skb);
 
                                BT_DBG("Event header: evt 0x%2.2x plen %d", eh->evt, eh->plen);
 
@@ -197,7 +191,7 @@ static int h4_recv(struct hci_uart *hu, void *data, int count)
                                continue;
 
                        case H4_W4_ACL_HDR:
-                               ah = (struct hci_acl_hdr *) h4->rx_skb->data;
+                               ah = hci_acl_hdr(h4->rx_skb);
                                dlen = __le16_to_cpu(ah->dlen);
 
                                BT_DBG("ACL header: dlen %d", dlen);
@@ -206,7 +200,7 @@ static int h4_recv(struct hci_uart *hu, void *data, int count)
                                continue;
 
                        case H4_W4_SCO_HDR:
-                               sh = (struct hci_sco_hdr *) h4->rx_skb->data;
+                               sh = hci_sco_hdr(h4->rx_skb);
 
                                BT_DBG("SCO header: dlen %d", sh->dlen);