Bluetooth: Remove unused h4_check_data_len() function
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 10 Oct 2013 23:52:42 +0000 (16:52 -0700)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 11 Oct 2013 05:51:09 +0000 (07:51 +0200)
The function h4_check_data_len() is actually not used. So just
remove it.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
drivers/bluetooth/hci_h4.c

index 8ae9f1ea2bb5e59dd40f5c905c3057b5f0e35417..7048a583fe51a695a044ad541a0f894e3bf7c510 100644 (file)
@@ -124,30 +124,6 @@ static int h4_enqueue(struct hci_uart *hu, struct sk_buff *skb)
        return 0;
 }
 
-static inline int h4_check_data_len(struct h4_struct *h4, int len)
-{
-       int room = skb_tailroom(h4->rx_skb);
-
-       BT_DBG("len %d room %d", len, room);
-
-       if (!len) {
-               hci_recv_frame(h4->rx_skb);
-       } else if (len > room) {
-               BT_ERR("Data length is too large");
-               kfree_skb(h4->rx_skb);
-       } else {
-               h4->rx_state = H4_W4_DATA;
-               h4->rx_count = len;
-               return len;
-       }
-
-       h4->rx_state = H4_W4_PACKET_TYPE;
-       h4->rx_skb   = NULL;
-       h4->rx_count = 0;
-
-       return 0;
-}
-
 /* Recv data */
 static int h4_recv(struct hci_uart *hu, void *data, int count)
 {