diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2010-05-21 15:27:26 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-05-21 15:27:26 -0400 |
commit | ee9a3607fb03e804ddf624544105f4e34260c380 (patch) | |
tree | ce41b6e0fa10982a306f6c142a92dbf3c9961284 /drivers/bluetooth | |
parent | b492e95be0ae672922f4734acf3f5d35c30be948 (diff) | |
parent | d515e86e639890b33a09390d062b0831664f04a2 (diff) |
Merge branch 'master' into for-2.6.35
Conflicts:
fs/ext3/fsync.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/bluecard_cs.c | 11 | ||||
-rw-r--r-- | drivers/bluetooth/bt3c_cs.c | 11 | ||||
-rw-r--r-- | drivers/bluetooth/btmrvl_drv.h | 8 | ||||
-rw-r--r-- | drivers/bluetooth/btmrvl_main.c | 92 | ||||
-rw-r--r-- | drivers/bluetooth/btmrvl_sdio.c | 7 | ||||
-rw-r--r-- | drivers/bluetooth/btuart_cs.c | 11 | ||||
-rw-r--r-- | drivers/bluetooth/dtl1_cs.c | 11 | ||||
-rw-r--r-- | drivers/bluetooth/hci_h4.c | 2 | ||||
-rw-r--r-- | drivers/bluetooth/hci_ll.c | 8 | ||||
-rw-r--r-- | drivers/bluetooth/hci_vhci.c | 2 |
10 files changed, 84 insertions, 79 deletions
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index d9bf87ca9e83..6f907ebed2d5 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c | |||
@@ -65,7 +65,6 @@ MODULE_LICENSE("GPL"); | |||
65 | 65 | ||
66 | typedef struct bluecard_info_t { | 66 | typedef struct bluecard_info_t { |
67 | struct pcmcia_device *p_dev; | 67 | struct pcmcia_device *p_dev; |
68 | dev_node_t node; | ||
69 | 68 | ||
70 | struct hci_dev *hdev; | 69 | struct hci_dev *hdev; |
71 | 70 | ||
@@ -869,9 +868,6 @@ static int bluecard_probe(struct pcmcia_device *link) | |||
869 | 868 | ||
870 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 869 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
871 | link->io.NumPorts1 = 8; | 870 | link->io.NumPorts1 = 8; |
872 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
873 | |||
874 | link->irq.Handler = bluecard_interrupt; | ||
875 | 871 | ||
876 | link->conf.Attributes = CONF_ENABLE_IRQ; | 872 | link->conf.Attributes = CONF_ENABLE_IRQ; |
877 | link->conf.IntType = INT_MEMORY_AND_IO; | 873 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -908,9 +904,9 @@ static int bluecard_config(struct pcmcia_device *link) | |||
908 | if (i != 0) | 904 | if (i != 0) |
909 | goto failed; | 905 | goto failed; |
910 | 906 | ||
911 | i = pcmcia_request_irq(link, &link->irq); | 907 | i = pcmcia_request_irq(link, bluecard_interrupt); |
912 | if (i != 0) | 908 | if (i != 0) |
913 | link->irq.AssignedIRQ = 0; | 909 | goto failed; |
914 | 910 | ||
915 | i = pcmcia_request_configuration(link, &link->conf); | 911 | i = pcmcia_request_configuration(link, &link->conf); |
916 | if (i != 0) | 912 | if (i != 0) |
@@ -919,9 +915,6 @@ static int bluecard_config(struct pcmcia_device *link) | |||
919 | if (bluecard_open(info) != 0) | 915 | if (bluecard_open(info) != 0) |
920 | goto failed; | 916 | goto failed; |
921 | 917 | ||
922 | strcpy(info->node.dev_name, info->hdev->name); | ||
923 | link->dev_node = &info->node; | ||
924 | |||
925 | return 0; | 918 | return 0; |
926 | 919 | ||
927 | failed: | 920 | failed: |
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index 027cb8bf650f..21e05fdc9121 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c | |||
@@ -72,7 +72,6 @@ MODULE_FIRMWARE("BT3CPCC.bin"); | |||
72 | 72 | ||
73 | typedef struct bt3c_info_t { | 73 | typedef struct bt3c_info_t { |
74 | struct pcmcia_device *p_dev; | 74 | struct pcmcia_device *p_dev; |
75 | dev_node_t node; | ||
76 | 75 | ||
77 | struct hci_dev *hdev; | 76 | struct hci_dev *hdev; |
78 | 77 | ||
@@ -661,9 +660,6 @@ static int bt3c_probe(struct pcmcia_device *link) | |||
661 | 660 | ||
662 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 661 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
663 | link->io.NumPorts1 = 8; | 662 | link->io.NumPorts1 = 8; |
664 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
665 | |||
666 | link->irq.Handler = bt3c_interrupt; | ||
667 | 663 | ||
668 | link->conf.Attributes = CONF_ENABLE_IRQ; | 664 | link->conf.Attributes = CONF_ENABLE_IRQ; |
669 | link->conf.IntType = INT_MEMORY_AND_IO; | 665 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -743,9 +739,9 @@ static int bt3c_config(struct pcmcia_device *link) | |||
743 | goto failed; | 739 | goto failed; |
744 | 740 | ||
745 | found_port: | 741 | found_port: |
746 | i = pcmcia_request_irq(link, &link->irq); | 742 | i = pcmcia_request_irq(link, &bt3c_interrupt); |
747 | if (i != 0) | 743 | if (i != 0) |
748 | link->irq.AssignedIRQ = 0; | 744 | goto failed; |
749 | 745 | ||
750 | i = pcmcia_request_configuration(link, &link->conf); | 746 | i = pcmcia_request_configuration(link, &link->conf); |
751 | if (i != 0) | 747 | if (i != 0) |
@@ -754,9 +750,6 @@ found_port: | |||
754 | if (bt3c_open(info) != 0) | 750 | if (bt3c_open(info) != 0) |
755 | goto failed; | 751 | goto failed; |
756 | 752 | ||
757 | strcpy(info->node.dev_name, info->hdev->name); | ||
758 | link->dev_node = &info->node; | ||
759 | |||
760 | return 0; | 753 | return 0; |
761 | 754 | ||
762 | failed: | 755 | failed: |
diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h index 204727586ee9..bed0ba630235 100644 --- a/drivers/bluetooth/btmrvl_drv.h +++ b/drivers/bluetooth/btmrvl_drv.h | |||
@@ -42,6 +42,8 @@ struct btmrvl_device { | |||
42 | void *card; | 42 | void *card; |
43 | struct hci_dev *hcidev; | 43 | struct hci_dev *hcidev; |
44 | 44 | ||
45 | u8 dev_type; | ||
46 | |||
45 | u8 tx_dnld_rdy; | 47 | u8 tx_dnld_rdy; |
46 | 48 | ||
47 | u8 psmode; | 49 | u8 psmode; |
@@ -88,8 +90,11 @@ struct btmrvl_private { | |||
88 | #define BT_CMD_HOST_SLEEP_ENABLE 0x5A | 90 | #define BT_CMD_HOST_SLEEP_ENABLE 0x5A |
89 | #define BT_CMD_MODULE_CFG_REQ 0x5B | 91 | #define BT_CMD_MODULE_CFG_REQ 0x5B |
90 | 92 | ||
91 | /* Sub-commands: Module Bringup/Shutdown Request */ | 93 | /* Sub-commands: Module Bringup/Shutdown Request/Response */ |
92 | #define MODULE_BRINGUP_REQ 0xF1 | 94 | #define MODULE_BRINGUP_REQ 0xF1 |
95 | #define MODULE_BROUGHT_UP 0x00 | ||
96 | #define MODULE_ALREADY_UP 0x0C | ||
97 | |||
93 | #define MODULE_SHUTDOWN_REQ 0xF2 | 98 | #define MODULE_SHUTDOWN_REQ 0xF2 |
94 | 99 | ||
95 | #define BT_EVENT_POWER_STATE 0x20 | 100 | #define BT_EVENT_POWER_STATE 0x20 |
@@ -123,6 +128,7 @@ struct btmrvl_event { | |||
123 | 128 | ||
124 | /* Prototype of global function */ | 129 | /* Prototype of global function */ |
125 | 130 | ||
131 | int btmrvl_register_hdev(struct btmrvl_private *priv); | ||
126 | struct btmrvl_private *btmrvl_add_card(void *card); | 132 | struct btmrvl_private *btmrvl_add_card(void *card); |
127 | int btmrvl_remove_card(struct btmrvl_private *priv); | 133 | int btmrvl_remove_card(struct btmrvl_private *priv); |
128 | 134 | ||
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index 53a43adf2e21..ee37ef0caee2 100644 --- a/drivers/bluetooth/btmrvl_main.c +++ b/drivers/bluetooth/btmrvl_main.c | |||
@@ -66,7 +66,7 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb) | |||
66 | { | 66 | { |
67 | struct btmrvl_adapter *adapter = priv->adapter; | 67 | struct btmrvl_adapter *adapter = priv->adapter; |
68 | struct btmrvl_event *event; | 68 | struct btmrvl_event *event; |
69 | u8 ret = 0; | 69 | int ret = 0; |
70 | 70 | ||
71 | event = (struct btmrvl_event *) skb->data; | 71 | event = (struct btmrvl_event *) skb->data; |
72 | if (event->ec != 0xff) { | 72 | if (event->ec != 0xff) { |
@@ -112,8 +112,17 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb) | |||
112 | case BT_CMD_MODULE_CFG_REQ: | 112 | case BT_CMD_MODULE_CFG_REQ: |
113 | if (priv->btmrvl_dev.sendcmdflag && | 113 | if (priv->btmrvl_dev.sendcmdflag && |
114 | event->data[1] == MODULE_BRINGUP_REQ) { | 114 | event->data[1] == MODULE_BRINGUP_REQ) { |
115 | BT_DBG("EVENT:%s", (event->data[2]) ? | 115 | BT_DBG("EVENT:%s", |
116 | "Bring-up failed" : "Bring-up succeed"); | 116 | ((event->data[2] == MODULE_BROUGHT_UP) || |
117 | (event->data[2] == MODULE_ALREADY_UP)) ? | ||
118 | "Bring-up succeed" : "Bring-up failed"); | ||
119 | |||
120 | if (event->length > 3) | ||
121 | priv->btmrvl_dev.dev_type = event->data[3]; | ||
122 | else | ||
123 | priv->btmrvl_dev.dev_type = HCI_BREDR; | ||
124 | |||
125 | BT_DBG("dev_type: %d", priv->btmrvl_dev.dev_type); | ||
117 | } else if (priv->btmrvl_dev.sendcmdflag && | 126 | } else if (priv->btmrvl_dev.sendcmdflag && |
118 | event->data[1] == MODULE_SHUTDOWN_REQ) { | 127 | event->data[1] == MODULE_SHUTDOWN_REQ) { |
119 | BT_DBG("EVENT:%s", (event->data[2]) ? | 128 | BT_DBG("EVENT:%s", (event->data[2]) ? |
@@ -522,47 +531,20 @@ static int btmrvl_service_main_thread(void *data) | |||
522 | return 0; | 531 | return 0; |
523 | } | 532 | } |
524 | 533 | ||
525 | struct btmrvl_private *btmrvl_add_card(void *card) | 534 | int btmrvl_register_hdev(struct btmrvl_private *priv) |
526 | { | 535 | { |
527 | struct hci_dev *hdev = NULL; | 536 | struct hci_dev *hdev = NULL; |
528 | struct btmrvl_private *priv; | ||
529 | int ret; | 537 | int ret; |
530 | 538 | ||
531 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | ||
532 | if (!priv) { | ||
533 | BT_ERR("Can not allocate priv"); | ||
534 | goto err_priv; | ||
535 | } | ||
536 | |||
537 | priv->adapter = kzalloc(sizeof(*priv->adapter), GFP_KERNEL); | ||
538 | if (!priv->adapter) { | ||
539 | BT_ERR("Allocate buffer for btmrvl_adapter failed!"); | ||
540 | goto err_adapter; | ||
541 | } | ||
542 | |||
543 | btmrvl_init_adapter(priv); | ||
544 | |||
545 | hdev = hci_alloc_dev(); | 539 | hdev = hci_alloc_dev(); |
546 | if (!hdev) { | 540 | if (!hdev) { |
547 | BT_ERR("Can not allocate HCI device"); | 541 | BT_ERR("Can not allocate HCI device"); |
548 | goto err_hdev; | 542 | goto err_hdev; |
549 | } | 543 | } |
550 | 544 | ||
551 | BT_DBG("Starting kthread..."); | ||
552 | priv->main_thread.priv = priv; | ||
553 | spin_lock_init(&priv->driver_lock); | ||
554 | |||
555 | init_waitqueue_head(&priv->main_thread.wait_q); | ||
556 | priv->main_thread.task = kthread_run(btmrvl_service_main_thread, | ||
557 | &priv->main_thread, "btmrvl_main_service"); | ||
558 | |||
559 | priv->btmrvl_dev.hcidev = hdev; | 545 | priv->btmrvl_dev.hcidev = hdev; |
560 | priv->btmrvl_dev.card = card; | ||
561 | |||
562 | hdev->driver_data = priv; | 546 | hdev->driver_data = priv; |
563 | 547 | ||
564 | priv->btmrvl_dev.tx_dnld_rdy = true; | ||
565 | |||
566 | hdev->bus = HCI_SDIO; | 548 | hdev->bus = HCI_SDIO; |
567 | hdev->open = btmrvl_open; | 549 | hdev->open = btmrvl_open; |
568 | hdev->close = btmrvl_close; | 550 | hdev->close = btmrvl_close; |
@@ -572,6 +554,10 @@ struct btmrvl_private *btmrvl_add_card(void *card) | |||
572 | hdev->ioctl = btmrvl_ioctl; | 554 | hdev->ioctl = btmrvl_ioctl; |
573 | hdev->owner = THIS_MODULE; | 555 | hdev->owner = THIS_MODULE; |
574 | 556 | ||
557 | btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ); | ||
558 | |||
559 | hdev->dev_type = priv->btmrvl_dev.dev_type; | ||
560 | |||
575 | ret = hci_register_dev(hdev); | 561 | ret = hci_register_dev(hdev); |
576 | if (ret < 0) { | 562 | if (ret < 0) { |
577 | BT_ERR("Can not register HCI device"); | 563 | BT_ERR("Can not register HCI device"); |
@@ -582,16 +568,52 @@ struct btmrvl_private *btmrvl_add_card(void *card) | |||
582 | btmrvl_debugfs_init(hdev); | 568 | btmrvl_debugfs_init(hdev); |
583 | #endif | 569 | #endif |
584 | 570 | ||
585 | return priv; | 571 | return 0; |
586 | 572 | ||
587 | err_hci_register_dev: | 573 | err_hci_register_dev: |
588 | /* Stop the thread servicing the interrupts */ | ||
589 | kthread_stop(priv->main_thread.task); | ||
590 | |||
591 | hci_free_dev(hdev); | 574 | hci_free_dev(hdev); |
592 | 575 | ||
593 | err_hdev: | 576 | err_hdev: |
577 | /* Stop the thread servicing the interrupts */ | ||
578 | kthread_stop(priv->main_thread.task); | ||
579 | |||
594 | btmrvl_free_adapter(priv); | 580 | btmrvl_free_adapter(priv); |
581 | kfree(priv); | ||
582 | |||
583 | return -ENOMEM; | ||
584 | } | ||
585 | EXPORT_SYMBOL_GPL(btmrvl_register_hdev); | ||
586 | |||
587 | struct btmrvl_private *btmrvl_add_card(void *card) | ||
588 | { | ||
589 | struct btmrvl_private *priv; | ||
590 | |||
591 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | ||
592 | if (!priv) { | ||
593 | BT_ERR("Can not allocate priv"); | ||
594 | goto err_priv; | ||
595 | } | ||
596 | |||
597 | priv->adapter = kzalloc(sizeof(*priv->adapter), GFP_KERNEL); | ||
598 | if (!priv->adapter) { | ||
599 | BT_ERR("Allocate buffer for btmrvl_adapter failed!"); | ||
600 | goto err_adapter; | ||
601 | } | ||
602 | |||
603 | btmrvl_init_adapter(priv); | ||
604 | |||
605 | BT_DBG("Starting kthread..."); | ||
606 | priv->main_thread.priv = priv; | ||
607 | spin_lock_init(&priv->driver_lock); | ||
608 | |||
609 | init_waitqueue_head(&priv->main_thread.wait_q); | ||
610 | priv->main_thread.task = kthread_run(btmrvl_service_main_thread, | ||
611 | &priv->main_thread, "btmrvl_main_service"); | ||
612 | |||
613 | priv->btmrvl_dev.card = card; | ||
614 | priv->btmrvl_dev.tx_dnld_rdy = true; | ||
615 | |||
616 | return priv; | ||
595 | 617 | ||
596 | err_adapter: | 618 | err_adapter: |
597 | kfree(priv); | 619 | kfree(priv); |
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index 0dba76aa2232..df0773ebd9e4 100644 --- a/drivers/bluetooth/btmrvl_sdio.c +++ b/drivers/bluetooth/btmrvl_sdio.c | |||
@@ -931,7 +931,12 @@ static int btmrvl_sdio_probe(struct sdio_func *func, | |||
931 | priv->hw_host_to_card = btmrvl_sdio_host_to_card; | 931 | priv->hw_host_to_card = btmrvl_sdio_host_to_card; |
932 | priv->hw_wakeup_firmware = btmrvl_sdio_wakeup_fw; | 932 | priv->hw_wakeup_firmware = btmrvl_sdio_wakeup_fw; |
933 | 933 | ||
934 | btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ); | 934 | if (btmrvl_register_hdev(priv)) { |
935 | BT_ERR("Register hdev failed!"); | ||
936 | ret = -ENODEV; | ||
937 | goto disable_host_int; | ||
938 | } | ||
939 | |||
935 | priv->btmrvl_dev.psmode = 1; | 940 | priv->btmrvl_dev.psmode = 1; |
936 | btmrvl_enable_ps(priv); | 941 | btmrvl_enable_ps(priv); |
937 | 942 | ||
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c index 60c0953d7d00..4ed7288f99db 100644 --- a/drivers/bluetooth/btuart_cs.c +++ b/drivers/bluetooth/btuart_cs.c | |||
@@ -67,7 +67,6 @@ MODULE_LICENSE("GPL"); | |||
67 | 67 | ||
68 | typedef struct btuart_info_t { | 68 | typedef struct btuart_info_t { |
69 | struct pcmcia_device *p_dev; | 69 | struct pcmcia_device *p_dev; |
70 | dev_node_t node; | ||
71 | 70 | ||
72 | struct hci_dev *hdev; | 71 | struct hci_dev *hdev; |
73 | 72 | ||
@@ -590,9 +589,6 @@ static int btuart_probe(struct pcmcia_device *link) | |||
590 | 589 | ||
591 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 590 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
592 | link->io.NumPorts1 = 8; | 591 | link->io.NumPorts1 = 8; |
593 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
594 | |||
595 | link->irq.Handler = btuart_interrupt; | ||
596 | 592 | ||
597 | link->conf.Attributes = CONF_ENABLE_IRQ; | 593 | link->conf.Attributes = CONF_ENABLE_IRQ; |
598 | link->conf.IntType = INT_MEMORY_AND_IO; | 594 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -672,9 +668,9 @@ static int btuart_config(struct pcmcia_device *link) | |||
672 | goto failed; | 668 | goto failed; |
673 | 669 | ||
674 | found_port: | 670 | found_port: |
675 | i = pcmcia_request_irq(link, &link->irq); | 671 | i = pcmcia_request_irq(link, btuart_interrupt); |
676 | if (i != 0) | 672 | if (i != 0) |
677 | link->irq.AssignedIRQ = 0; | 673 | goto failed; |
678 | 674 | ||
679 | i = pcmcia_request_configuration(link, &link->conf); | 675 | i = pcmcia_request_configuration(link, &link->conf); |
680 | if (i != 0) | 676 | if (i != 0) |
@@ -683,9 +679,6 @@ found_port: | |||
683 | if (btuart_open(info) != 0) | 679 | if (btuart_open(info) != 0) |
684 | goto failed; | 680 | goto failed; |
685 | 681 | ||
686 | strcpy(info->node.dev_name, info->hdev->name); | ||
687 | link->dev_node = &info->node; | ||
688 | |||
689 | return 0; | 682 | return 0; |
690 | 683 | ||
691 | failed: | 684 | failed: |
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c index 17788317c51a..ef044d55cb25 100644 --- a/drivers/bluetooth/dtl1_cs.c +++ b/drivers/bluetooth/dtl1_cs.c | |||
@@ -67,7 +67,6 @@ MODULE_LICENSE("GPL"); | |||
67 | 67 | ||
68 | typedef struct dtl1_info_t { | 68 | typedef struct dtl1_info_t { |
69 | struct pcmcia_device *p_dev; | 69 | struct pcmcia_device *p_dev; |
70 | dev_node_t node; | ||
71 | 70 | ||
72 | struct hci_dev *hdev; | 71 | struct hci_dev *hdev; |
73 | 72 | ||
@@ -575,9 +574,6 @@ static int dtl1_probe(struct pcmcia_device *link) | |||
575 | 574 | ||
576 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 575 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
577 | link->io.NumPorts1 = 8; | 576 | link->io.NumPorts1 = 8; |
578 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
579 | |||
580 | link->irq.Handler = dtl1_interrupt; | ||
581 | 577 | ||
582 | link->conf.Attributes = CONF_ENABLE_IRQ; | 578 | link->conf.Attributes = CONF_ENABLE_IRQ; |
583 | link->conf.IntType = INT_MEMORY_AND_IO; | 579 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -621,9 +617,9 @@ static int dtl1_config(struct pcmcia_device *link) | |||
621 | if (pcmcia_loop_config(link, dtl1_confcheck, NULL) < 0) | 617 | if (pcmcia_loop_config(link, dtl1_confcheck, NULL) < 0) |
622 | goto failed; | 618 | goto failed; |
623 | 619 | ||
624 | i = pcmcia_request_irq(link, &link->irq); | 620 | i = pcmcia_request_irq(link, dtl1_interrupt); |
625 | if (i != 0) | 621 | if (i != 0) |
626 | link->irq.AssignedIRQ = 0; | 622 | goto failed; |
627 | 623 | ||
628 | i = pcmcia_request_configuration(link, &link->conf); | 624 | i = pcmcia_request_configuration(link, &link->conf); |
629 | if (i != 0) | 625 | if (i != 0) |
@@ -632,9 +628,6 @@ static int dtl1_config(struct pcmcia_device *link) | |||
632 | if (dtl1_open(info) != 0) | 628 | if (dtl1_open(info) != 0) |
633 | goto failed; | 629 | goto failed; |
634 | 630 | ||
635 | strcpy(info->node.dev_name, info->hdev->name); | ||
636 | link->dev_node = &info->node; | ||
637 | |||
638 | return 0; | 631 | return 0; |
639 | 632 | ||
640 | failed: | 633 | failed: |
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c index c0ce8134814e..3f038f5308a4 100644 --- a/drivers/bluetooth/hci_h4.c +++ b/drivers/bluetooth/hci_h4.c | |||
@@ -246,7 +246,7 @@ static int h4_recv(struct hci_uart *hu, void *data, int count) | |||
246 | BT_ERR("Can't allocate mem for new packet"); | 246 | BT_ERR("Can't allocate mem for new packet"); |
247 | h4->rx_state = H4_W4_PACKET_TYPE; | 247 | h4->rx_state = H4_W4_PACKET_TYPE; |
248 | h4->rx_count = 0; | 248 | h4->rx_count = 0; |
249 | return 0; | 249 | return -ENOMEM; |
250 | } | 250 | } |
251 | 251 | ||
252 | h4->rx_skb->dev = (void *) hu->hdev; | 252 | h4->rx_skb->dev = (void *) hu->hdev; |
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c index 5c65014635be..fb8445c7365e 100644 --- a/drivers/bluetooth/hci_ll.c +++ b/drivers/bluetooth/hci_ll.c | |||
@@ -402,7 +402,7 @@ static int ll_recv(struct hci_uart *hu, void *data, int count) | |||
402 | continue; | 402 | continue; |
403 | 403 | ||
404 | case HCILL_W4_EVENT_HDR: | 404 | case HCILL_W4_EVENT_HDR: |
405 | eh = (struct hci_event_hdr *) ll->rx_skb->data; | 405 | eh = hci_event_hdr(ll->rx_skb); |
406 | 406 | ||
407 | BT_DBG("Event header: evt 0x%2.2x plen %d", eh->evt, eh->plen); | 407 | BT_DBG("Event header: evt 0x%2.2x plen %d", eh->evt, eh->plen); |
408 | 408 | ||
@@ -410,7 +410,7 @@ static int ll_recv(struct hci_uart *hu, void *data, int count) | |||
410 | continue; | 410 | continue; |
411 | 411 | ||
412 | case HCILL_W4_ACL_HDR: | 412 | case HCILL_W4_ACL_HDR: |
413 | ah = (struct hci_acl_hdr *) ll->rx_skb->data; | 413 | ah = hci_acl_hdr(ll->rx_skb); |
414 | dlen = __le16_to_cpu(ah->dlen); | 414 | dlen = __le16_to_cpu(ah->dlen); |
415 | 415 | ||
416 | BT_DBG("ACL header: dlen %d", dlen); | 416 | BT_DBG("ACL header: dlen %d", dlen); |
@@ -419,7 +419,7 @@ static int ll_recv(struct hci_uart *hu, void *data, int count) | |||
419 | continue; | 419 | continue; |
420 | 420 | ||
421 | case HCILL_W4_SCO_HDR: | 421 | case HCILL_W4_SCO_HDR: |
422 | sh = (struct hci_sco_hdr *) ll->rx_skb->data; | 422 | sh = hci_sco_hdr(ll->rx_skb); |
423 | 423 | ||
424 | BT_DBG("SCO header: dlen %d", sh->dlen); | 424 | BT_DBG("SCO header: dlen %d", sh->dlen); |
425 | 425 | ||
@@ -491,7 +491,7 @@ static int ll_recv(struct hci_uart *hu, void *data, int count) | |||
491 | BT_ERR("Can't allocate mem for new packet"); | 491 | BT_ERR("Can't allocate mem for new packet"); |
492 | ll->rx_state = HCILL_W4_PACKET_TYPE; | 492 | ll->rx_state = HCILL_W4_PACKET_TYPE; |
493 | ll->rx_count = 0; | 493 | ll->rx_count = 0; |
494 | return 0; | 494 | return -ENOMEM; |
495 | } | 495 | } |
496 | 496 | ||
497 | ll->rx_skb->dev = (void *) hu->hdev; | 497 | ll->rx_skb->dev = (void *) hu->hdev; |
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index bb0aefdb4267..3aa7b2a54b6f 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c | |||
@@ -157,7 +157,7 @@ static inline ssize_t vhci_put_user(struct vhci_data *data, | |||
157 | break; | 157 | break; |
158 | 158 | ||
159 | case HCI_SCODATA_PKT: | 159 | case HCI_SCODATA_PKT: |
160 | data->hdev->stat.cmd_tx++; | 160 | data->hdev->stat.sco_tx++; |
161 | break; | 161 | break; |
162 | }; | 162 | }; |
163 | 163 | ||