Skip to content

Commit

Permalink
Bluetooth: Remove unused h4_check_data_len() function
Browse files Browse the repository at this point in the history
The function h4_check_data_len() is actually not used. So just
remove it.

Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
  • Loading branch information
holtmann authored and Johan Hedberg committed Oct 11, 2013
1 parent 5108699 commit 8909f6d
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions drivers/bluetooth/hci_h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 8909f6d

Please sign in to comment.