diff options
Diffstat (limited to 'drivers/bluetooth/bluecard_cs.c')
-rw-r--r-- | drivers/bluetooth/bluecard_cs.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index 1fcd92380356..66c3a6770c41 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c | |||
@@ -231,12 +231,12 @@ static void bluecard_write_wakeup(bluecard_info_t *info) | |||
231 | } | 231 | } |
232 | 232 | ||
233 | do { | 233 | do { |
234 | register unsigned int iobase = info->p_dev->resource[0]->start; | 234 | unsigned int iobase = info->p_dev->resource[0]->start; |
235 | register unsigned int offset; | 235 | unsigned int offset; |
236 | register unsigned char command; | 236 | unsigned char command; |
237 | register unsigned long ready_bit; | 237 | unsigned long ready_bit; |
238 | register struct sk_buff *skb; | 238 | register struct sk_buff *skb; |
239 | register int len; | 239 | int len; |
240 | 240 | ||
241 | clear_bit(XMIT_WAKEUP, &(info->tx_state)); | 241 | clear_bit(XMIT_WAKEUP, &(info->tx_state)); |
242 | 242 | ||
@@ -621,7 +621,6 @@ static int bluecard_hci_flush(struct hci_dev *hdev) | |||
621 | static int bluecard_hci_open(struct hci_dev *hdev) | 621 | static 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) | |||
641 | static int bluecard_hci_close(struct hci_dev *hdev) | 642 | static 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 | } |