]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/bluetooth/bluecard_cs.c
net: fec: call dma_mapping_error() where appropriate
[karo-tx-linux.git] / drivers / bluetooth / bluecard_cs.c
index 6c3e3d43c718a1d756c9308a8a135bd9e64a2e32..57427de864a657530ec92f1a54fe9e0d5c52938e 100644 (file)
@@ -399,7 +399,6 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
 
                if (info->rx_state == RECV_WAIT_PACKET_TYPE) {
 
-                       info->rx_skb->dev = (void *) info->hdev;
                        bt_cb(info->rx_skb)->pkt_type = buf[i];
 
                        switch (bt_cb(info->rx_skb)->pkt_type) {
@@ -477,7 +476,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
                                        break;
 
                                case RECV_WAIT_DATA:
-                                       hci_recv_frame(info->rx_skb);
+                                       hci_recv_frame(info->hdev, info->rx_skb);
                                        info->rx_skb = NULL;
                                        break;
 
@@ -659,17 +658,9 @@ static int bluecard_hci_close(struct hci_dev *hdev)
 }
 
 
-static int bluecard_hci_send_frame(struct sk_buff *skb)
+static int bluecard_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
 {
-       bluecard_info_t *info;
-       struct hci_dev *hdev = (struct hci_dev *)(skb->dev);
-
-       if (!hdev) {
-               BT_ERR("Frame for unknown HCI device (hdev=NULL)");
-               return -ENODEV;
-       }
-
-       info = hci_get_drvdata(hdev);
+       bluecard_info_t *info = hci_get_drvdata(hdev);
 
        switch (bt_cb(skb)->pkt_type) {
        case HCI_COMMAND_PKT:
@@ -693,12 +684,6 @@ static int bluecard_hci_send_frame(struct sk_buff *skb)
 }
 
 
-static int bluecard_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long arg)
-{
-       return -ENOIOCTLCMD;
-}
-
-
 
 /* ======================== Card services HCI interaction ======================== */
 
@@ -734,11 +719,10 @@ static int bluecard_open(bluecard_info_t *info)
        hci_set_drvdata(hdev, info);
        SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
 
-       hdev->open     = bluecard_hci_open;
-       hdev->close    = bluecard_hci_close;
-       hdev->flush    = bluecard_hci_flush;
-       hdev->send     = bluecard_hci_send_frame;
-       hdev->ioctl    = bluecard_hci_ioctl;
+       hdev->open  = bluecard_hci_open;
+       hdev->close = bluecard_hci_close;
+       hdev->flush = bluecard_hci_flush;
+       hdev->send  = bluecard_hci_send_frame;
 
        id = inb(iobase + 0x30);