aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/bluetooth/bluecard_cs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c
index 585c88e01893..66c3a6770c41 100644
--- a/drivers/bluetooth/bluecard_cs.c
+++ b/drivers/bluetooth/bluecard_cs.c
@@ -621,7 +621,6 @@ static int bluecard_hci_flush(struct hci_dev *hdev)
621static int bluecard_hci_open(struct hci_dev *hdev) 621static int bluecard_hci_open(struct hci_dev *hdev)
622{ 622{
623 bluecard_info_t *info = hci_get_drvdata(hdev); 623 bluecard_info_t *info = hci_get_drvdata(hdev);
624 unsigned int iobase = info->p_dev->resource[0]->start;
625 624
626 if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) 625 if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
627 bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE); 626 bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE);
@@ -630,6 +629,8 @@ static int bluecard_hci_open(struct hci_dev *hdev)
630 return 0; 629 return 0;
631 630
632 if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) { 631 if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) {
632 unsigned int iobase = info->p_dev->resource[0]->start;
633
633 /* Enable LED */ 634 /* Enable LED */
634 outb(0x08 | 0x20, iobase + 0x30); 635 outb(0x08 | 0x20, iobase + 0x30);
635 } 636 }
@@ -641,7 +642,6 @@ static int bluecard_hci_open(struct hci_dev *hdev)
641static int bluecard_hci_close(struct hci_dev *hdev) 642static int bluecard_hci_close(struct hci_dev *hdev)
642{ 643{
643 bluecard_info_t *info = hci_get_drvdata(hdev); 644 bluecard_info_t *info = hci_get_drvdata(hdev);
644 unsigned int iobase = info->p_dev->resource[0]->start;
645 645
646 if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags))) 646 if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags)))
647 return 0; 647 return 0;
@@ -649,6 +649,8 @@ static int bluecard_hci_close(struct hci_dev *hdev)
649 bluecard_hci_flush(hdev); 649 bluecard_hci_flush(hdev);
650 650
651 if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) { 651 if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) {
652 unsigned int iobase = info->p_dev->resource[0]->start;
653
652 /* Disable LED */ 654 /* Disable LED */
653 outb(0x00, iobase + 0x30); 655 outb(0x00, iobase + 0x30);
654 } 656 }