aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-07-24 09:58:54 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-08-03 03:03:59 -0400
commit9a017a910346afd88ec2e065989903bf211a7d37 (patch)
treeb407945c6e762f252bb81ae0fd64c745bba2ad11 /drivers/bluetooth
parent2ce4905e4da9f512b38f56a53ece9da2072dd164 (diff)
pcmcia: do not use io_req_t after call to pcmcia_request_io()
After pcmcia_request_io(), do not make use of the values stored in io_req_t, but instead use those found in struct pcmcia_device->resource[]. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org Acked-by: Marcel Holtmann <marcel@holtmann.org> (for drivers/bluetooth/) Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/bluecard_cs.c18
-rw-r--r--drivers/bluetooth/bt3c_cs.c8
-rw-r--r--drivers/bluetooth/btuart_cs.c12
-rw-r--r--drivers/bluetooth/dtl1_cs.c13
4 files changed, 26 insertions, 25 deletions
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c
index eb085de16713..24d2007139e8 100644
--- a/drivers/bluetooth/bluecard_cs.c
+++ b/drivers/bluetooth/bluecard_cs.c
@@ -159,7 +159,7 @@ static void bluecard_detach(struct pcmcia_device *p_dev);
159static void bluecard_activity_led_timeout(u_long arg) 159static void bluecard_activity_led_timeout(u_long arg)
160{ 160{
161 bluecard_info_t *info = (bluecard_info_t *)arg; 161 bluecard_info_t *info = (bluecard_info_t *)arg;
162 unsigned int iobase = info->p_dev->io.BasePort1; 162 unsigned int iobase = info->p_dev->resource[0]->start;
163 163
164 if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) 164 if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
165 return; 165 return;
@@ -176,7 +176,7 @@ static void bluecard_activity_led_timeout(u_long arg)
176 176
177static void bluecard_enable_activity_led(bluecard_info_t *info) 177static void bluecard_enable_activity_led(bluecard_info_t *info)
178{ 178{
179 unsigned int iobase = info->p_dev->io.BasePort1; 179 unsigned int iobase = info->p_dev->resource[0]->start;
180 180
181 if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) 181 if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
182 return; 182 return;
@@ -232,7 +232,7 @@ static void bluecard_write_wakeup(bluecard_info_t *info)
232 } 232 }
233 233
234 do { 234 do {
235 register unsigned int iobase = info->p_dev->io.BasePort1; 235 register unsigned int iobase = info->p_dev->resource[0]->start;
236 register unsigned int offset; 236 register unsigned int offset;
237 register unsigned char command; 237 register unsigned char command;
238 register unsigned long ready_bit; 238 register unsigned long ready_bit;
@@ -379,7 +379,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
379 return; 379 return;
380 } 380 }
381 381
382 iobase = info->p_dev->io.BasePort1; 382 iobase = info->p_dev->resource[0]->start;
383 383
384 if (test_bit(XMIT_SENDING_READY, &(info->tx_state))) 384 if (test_bit(XMIT_SENDING_READY, &(info->tx_state)))
385 bluecard_enable_activity_led(info); 385 bluecard_enable_activity_led(info);
@@ -508,7 +508,7 @@ static irqreturn_t bluecard_interrupt(int irq, void *dev_inst)
508 if (!test_bit(CARD_READY, &(info->hw_state))) 508 if (!test_bit(CARD_READY, &(info->hw_state)))
509 return IRQ_HANDLED; 509 return IRQ_HANDLED;
510 510
511 iobase = info->p_dev->io.BasePort1; 511 iobase = info->p_dev->resource[0]->start;
512 512
513 spin_lock(&(info->lock)); 513 spin_lock(&(info->lock));
514 514
@@ -622,7 +622,7 @@ static int bluecard_hci_flush(struct hci_dev *hdev)
622static int bluecard_hci_open(struct hci_dev *hdev) 622static int bluecard_hci_open(struct hci_dev *hdev)
623{ 623{
624 bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data); 624 bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data);
625 unsigned int iobase = info->p_dev->io.BasePort1; 625 unsigned int iobase = info->p_dev->resource[0]->start;
626 626
627 if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) 627 if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
628 bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE); 628 bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE);
@@ -642,7 +642,7 @@ static int bluecard_hci_open(struct hci_dev *hdev)
642static int bluecard_hci_close(struct hci_dev *hdev) 642static int bluecard_hci_close(struct hci_dev *hdev)
643{ 643{
644 bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data); 644 bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data);
645 unsigned int iobase = info->p_dev->io.BasePort1; 645 unsigned int iobase = info->p_dev->resource[0]->start;
646 646
647 if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags))) 647 if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags)))
648 return 0; 648 return 0;
@@ -709,7 +709,7 @@ static int bluecard_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned l
709 709
710static int bluecard_open(bluecard_info_t *info) 710static int bluecard_open(bluecard_info_t *info)
711{ 711{
712 unsigned int iobase = info->p_dev->io.BasePort1; 712 unsigned int iobase = info->p_dev->resource[0]->start;
713 struct hci_dev *hdev; 713 struct hci_dev *hdev;
714 unsigned char id; 714 unsigned char id;
715 715
@@ -828,7 +828,7 @@ static int bluecard_open(bluecard_info_t *info)
828 828
829static int bluecard_close(bluecard_info_t *info) 829static int bluecard_close(bluecard_info_t *info)
830{ 830{
831 unsigned int iobase = info->p_dev->io.BasePort1; 831 unsigned int iobase = info->p_dev->resource[0]->start;
832 struct hci_dev *hdev = info->hdev; 832 struct hci_dev *hdev = info->hdev;
833 833
834 if (!hdev) 834 if (!hdev)
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
index 457b603f8678..8ab494c0c17f 100644
--- a/drivers/bluetooth/bt3c_cs.c
+++ b/drivers/bluetooth/bt3c_cs.c
@@ -188,7 +188,7 @@ static void bt3c_write_wakeup(bt3c_info_t *info)
188 return; 188 return;
189 189
190 do { 190 do {
191 register unsigned int iobase = info->p_dev->io.BasePort1; 191 register unsigned int iobase = info->p_dev->resource[0]->start;
192 register struct sk_buff *skb; 192 register struct sk_buff *skb;
193 register int len; 193 register int len;
194 194
@@ -226,7 +226,7 @@ static void bt3c_receive(bt3c_info_t *info)
226 return; 226 return;
227 } 227 }
228 228
229 iobase = info->p_dev->io.BasePort1; 229 iobase = info->p_dev->resource[0]->start;
230 230
231 avail = bt3c_read(iobase, 0x7006); 231 avail = bt3c_read(iobase, 0x7006);
232 //printk("bt3c_cs: receiving %d bytes\n", avail); 232 //printk("bt3c_cs: receiving %d bytes\n", avail);
@@ -347,7 +347,7 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst)
347 /* our irq handler is shared */ 347 /* our irq handler is shared */
348 return IRQ_NONE; 348 return IRQ_NONE;
349 349
350 iobase = info->p_dev->io.BasePort1; 350 iobase = info->p_dev->resource[0]->start;
351 351
352 spin_lock(&(info->lock)); 352 spin_lock(&(info->lock));
353 353
@@ -480,7 +480,7 @@ static int bt3c_load_firmware(bt3c_info_t *info, const unsigned char *firmware,
480 unsigned int iobase, size, addr, fcs, tmp; 480 unsigned int iobase, size, addr, fcs, tmp;
481 int i, err = 0; 481 int i, err = 0;
482 482
483 iobase = info->p_dev->io.BasePort1; 483 iobase = info->p_dev->resource[0]->start;
484 484
485 /* Reset */ 485 /* Reset */
486 bt3c_io_write(iobase, 0x8040, 0x0404); 486 bt3c_io_write(iobase, 0x8040, 0x0404);
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c
index e7e0a17aecc2..7e770d40368d 100644
--- a/drivers/bluetooth/btuart_cs.c
+++ b/drivers/bluetooth/btuart_cs.c
@@ -142,7 +142,7 @@ static void btuart_write_wakeup(btuart_info_t *info)
142 } 142 }
143 143
144 do { 144 do {
145 register unsigned int iobase = info->p_dev->io.BasePort1; 145 register unsigned int iobase = info->p_dev->resource[0]->start;
146 register struct sk_buff *skb; 146 register struct sk_buff *skb;
147 register int len; 147 register int len;
148 148
@@ -183,7 +183,7 @@ static void btuart_receive(btuart_info_t *info)
183 return; 183 return;
184 } 184 }
185 185
186 iobase = info->p_dev->io.BasePort1; 186 iobase = info->p_dev->resource[0]->start;
187 187
188 do { 188 do {
189 info->hdev->stat.byte_rx++; 189 info->hdev->stat.byte_rx++;
@@ -297,7 +297,7 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst)
297 /* our irq handler is shared */ 297 /* our irq handler is shared */
298 return IRQ_NONE; 298 return IRQ_NONE;
299 299
300 iobase = info->p_dev->io.BasePort1; 300 iobase = info->p_dev->resource[0]->start;
301 301
302 spin_lock(&(info->lock)); 302 spin_lock(&(info->lock));
303 303
@@ -354,7 +354,7 @@ static void btuart_change_speed(btuart_info_t *info, unsigned int speed)
354 return; 354 return;
355 } 355 }
356 356
357 iobase = info->p_dev->io.BasePort1; 357 iobase = info->p_dev->resource[0]->start;
358 358
359 spin_lock_irqsave(&(info->lock), flags); 359 spin_lock_irqsave(&(info->lock), flags);
360 360
@@ -478,7 +478,7 @@ static int btuart_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned lon
478static int btuart_open(btuart_info_t *info) 478static int btuart_open(btuart_info_t *info)
479{ 479{
480 unsigned long flags; 480 unsigned long flags;
481 unsigned int iobase = info->p_dev->io.BasePort1; 481 unsigned int iobase = info->p_dev->resource[0]->start;
482 struct hci_dev *hdev; 482 struct hci_dev *hdev;
483 483
484 spin_lock_init(&(info->lock)); 484 spin_lock_init(&(info->lock));
@@ -548,7 +548,7 @@ static int btuart_open(btuart_info_t *info)
548static int btuart_close(btuart_info_t *info) 548static int btuart_close(btuart_info_t *info)
549{ 549{
550 unsigned long flags; 550 unsigned long flags;
551 unsigned int iobase = info->p_dev->io.BasePort1; 551 unsigned int iobase = info->p_dev->resource[0]->start;
552 struct hci_dev *hdev = info->hdev; 552 struct hci_dev *hdev = info->hdev;
553 553
554 if (!hdev) 554 if (!hdev)
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c
index 7c94aad0b791..bfe9313516fb 100644
--- a/drivers/bluetooth/dtl1_cs.c
+++ b/drivers/bluetooth/dtl1_cs.c
@@ -149,7 +149,7 @@ static void dtl1_write_wakeup(dtl1_info_t *info)
149 } 149 }
150 150
151 do { 151 do {
152 register unsigned int iobase = info->p_dev->io.BasePort1; 152 register unsigned int iobase = info->p_dev->resource[0]->start;
153 register struct sk_buff *skb; 153 register struct sk_buff *skb;
154 register int len; 154 register int len;
155 155
@@ -214,7 +214,7 @@ static void dtl1_receive(dtl1_info_t *info)
214 return; 214 return;
215 } 215 }
216 216
217 iobase = info->p_dev->io.BasePort1; 217 iobase = info->p_dev->resource[0]->start;
218 218
219 do { 219 do {
220 info->hdev->stat.byte_rx++; 220 info->hdev->stat.byte_rx++;
@@ -301,7 +301,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst)
301 /* our irq handler is shared */ 301 /* our irq handler is shared */
302 return IRQ_NONE; 302 return IRQ_NONE;
303 303
304 iobase = info->p_dev->io.BasePort1; 304 iobase = info->p_dev->resource[0]->start;
305 305
306 spin_lock(&(info->lock)); 306 spin_lock(&(info->lock));
307 307
@@ -461,7 +461,7 @@ static int dtl1_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long
461static int dtl1_open(dtl1_info_t *info) 461static int dtl1_open(dtl1_info_t *info)
462{ 462{
463 unsigned long flags; 463 unsigned long flags;
464 unsigned int iobase = info->p_dev->io.BasePort1; 464 unsigned int iobase = info->p_dev->resource[0]->start;
465 struct hci_dev *hdev; 465 struct hci_dev *hdev;
466 466
467 spin_lock_init(&(info->lock)); 467 spin_lock_init(&(info->lock));
@@ -508,7 +508,8 @@ static int dtl1_open(dtl1_info_t *info)
508 outb(UART_LCR_WLEN8, iobase + UART_LCR); /* Reset DLAB */ 508 outb(UART_LCR_WLEN8, iobase + UART_LCR); /* Reset DLAB */
509 outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase + UART_MCR); 509 outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase + UART_MCR);
510 510
511 info->ri_latch = inb(info->p_dev->io.BasePort1 + UART_MSR) & UART_MSR_RI; 511 info->ri_latch = inb(info->p_dev->resource[0]->start + UART_MSR)
512 & UART_MSR_RI;
512 513
513 /* Turn on interrupts */ 514 /* Turn on interrupts */
514 outb(UART_IER_RLSI | UART_IER_RDI | UART_IER_THRI, iobase + UART_IER); 515 outb(UART_IER_RLSI | UART_IER_RDI | UART_IER_THRI, iobase + UART_IER);
@@ -533,7 +534,7 @@ static int dtl1_open(dtl1_info_t *info)
533static int dtl1_close(dtl1_info_t *info) 534static int dtl1_close(dtl1_info_t *info)
534{ 535{
535 unsigned long flags; 536 unsigned long flags;
536 unsigned int iobase = info->p_dev->io.BasePort1; 537 unsigned int iobase = info->p_dev->resource[0]->start;
537 struct hci_dev *hdev = info->hdev; 538 struct hci_dev *hdev = info->hdev;
538 539
539 if (!hdev) 540 if (!hdev)