aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-06-29 07:58:07 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-06-30 11:33:06 -0400
commit74ad8fdaefe6ccb8ef1918394a9d04a036658346 (patch)
tree8371a8ebbf66b59008342e77599e0748aee0e61d /drivers/bluetooth
parentd300fa9b14549c64e63691356c68483bcfeb0f04 (diff)
Bluetooth: bluecard_cs: Shorten scope for iobase
Shortening scope shall silence some warnings reported by Geert Uytterhoeven: ... drivers/bluetooth/bluecard_cs.c: warning: unused variable 'iobase' [-Wunused-variable] ... Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'drivers/bluetooth')
-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 }