]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bluetooth: bluecard_cs: Shorten scope for iobase
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Fri, 29 Jun 2012 11:58:07 +0000 (14:58 +0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Sat, 30 Jun 2012 15:33:06 +0000 (12:33 -0300)
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>
drivers/bluetooth/bluecard_cs.c

index 585c88e018932fa9d9b6c46048be42678c535cec..66c3a6770c417a5dbb714a9c10ae029fc2675109 100644 (file)
@@ -621,7 +621,6 @@ static int bluecard_hci_flush(struct hci_dev *hdev)
 static int bluecard_hci_open(struct hci_dev *hdev)
 {
        bluecard_info_t *info = hci_get_drvdata(hdev);
-       unsigned int iobase = info->p_dev->resource[0]->start;
 
        if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
                bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE);
@@ -630,6 +629,8 @@ static int bluecard_hci_open(struct hci_dev *hdev)
                return 0;
 
        if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) {
+               unsigned int iobase = info->p_dev->resource[0]->start;
+
                /* Enable LED */
                outb(0x08 | 0x20, iobase + 0x30);
        }
@@ -641,7 +642,6 @@ static int bluecard_hci_open(struct hci_dev *hdev)
 static int bluecard_hci_close(struct hci_dev *hdev)
 {
        bluecard_info_t *info = hci_get_drvdata(hdev);
-       unsigned int iobase = info->p_dev->resource[0]->start;
 
        if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags)))
                return 0;
@@ -649,6 +649,8 @@ static int bluecard_hci_close(struct hci_dev *hdev)
        bluecard_hci_flush(hdev);
 
        if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) {
+               unsigned int iobase = info->p_dev->resource[0]->start;
+
                /* Disable LED */
                outb(0x00, iobase + 0x30);
        }