aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/dtl1_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/dtl1_cs.c')
-rw-r--r--drivers/bluetooth/dtl1_cs.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c
index b881a9cd8741..17788317c51a 100644
--- a/drivers/bluetooth/dtl1_cs.c
+++ b/drivers/bluetooth/dtl1_cs.c
@@ -299,7 +299,9 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst)
299 int iir, lsr; 299 int iir, lsr;
300 irqreturn_t r = IRQ_NONE; 300 irqreturn_t r = IRQ_NONE;
301 301
302 BUG_ON(!info->hdev); 302 if (!info || !info->hdev)
303 /* our irq handler is shared */
304 return IRQ_NONE;
303 305
304 iobase = info->p_dev->io.BasePort1; 306 iobase = info->p_dev->io.BasePort1;
305 307
@@ -483,7 +485,7 @@ static int dtl1_open(dtl1_info_t *info)
483 485
484 info->hdev = hdev; 486 info->hdev = hdev;
485 487
486 hdev->type = HCI_PCCARD; 488 hdev->bus = HCI_PCCARD;
487 hdev->driver_data = info; 489 hdev->driver_data = info;
488 SET_HCIDEV_DEV(hdev, &info->p_dev->dev); 490 SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
489 491
@@ -573,11 +575,9 @@ static int dtl1_probe(struct pcmcia_device *link)
573 575
574 link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; 576 link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
575 link->io.NumPorts1 = 8; 577 link->io.NumPorts1 = 8;
576 link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; 578 link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
577 link->irq.IRQInfo1 = IRQ_LEVEL_ID;
578 579
579 link->irq.Handler = dtl1_interrupt; 580 link->irq.Handler = dtl1_interrupt;
580 link->irq.Instance = info;
581 581
582 link->conf.Attributes = CONF_ENABLE_IRQ; 582 link->conf.Attributes = CONF_ENABLE_IRQ;
583 link->conf.IntType = INT_MEMORY_AND_IO; 583 link->conf.IntType = INT_MEMORY_AND_IO;
@@ -622,16 +622,12 @@ static int dtl1_config(struct pcmcia_device *link)
622 goto failed; 622 goto failed;
623 623
624 i = pcmcia_request_irq(link, &link->irq); 624 i = pcmcia_request_irq(link, &link->irq);
625 if (i != 0) { 625 if (i != 0)
626 cs_error(link, RequestIRQ, i);
627 link->irq.AssignedIRQ = 0; 626 link->irq.AssignedIRQ = 0;
628 }
629 627
630 i = pcmcia_request_configuration(link, &link->conf); 628 i = pcmcia_request_configuration(link, &link->conf);
631 if (i != 0) { 629 if (i != 0)
632 cs_error(link, RequestConfiguration, i);
633 goto failed; 630 goto failed;
634 }
635 631
636 if (dtl1_open(info) != 0) 632 if (dtl1_open(info) != 0)
637 goto failed; 633 goto failed;