diff options
Diffstat (limited to 'drivers/bluetooth/bluecard_cs.c')
-rw-r--r-- | drivers/bluetooth/bluecard_cs.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index b0e569ba730d..d9bf87ca9e83 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c | |||
@@ -503,7 +503,9 @@ static irqreturn_t bluecard_interrupt(int irq, void *dev_inst) | |||
503 | unsigned int iobase; | 503 | unsigned int iobase; |
504 | unsigned char reg; | 504 | unsigned char reg; |
505 | 505 | ||
506 | BUG_ON(!info->hdev); | 506 | if (!info || !info->hdev) |
507 | /* our irq handler is shared */ | ||
508 | return IRQ_NONE; | ||
507 | 509 | ||
508 | if (!test_bit(CARD_READY, &(info->hw_state))) | 510 | if (!test_bit(CARD_READY, &(info->hw_state))) |
509 | return IRQ_HANDLED; | 511 | return IRQ_HANDLED; |
@@ -734,7 +736,7 @@ static int bluecard_open(bluecard_info_t *info) | |||
734 | 736 | ||
735 | info->hdev = hdev; | 737 | info->hdev = hdev; |
736 | 738 | ||
737 | hdev->type = HCI_PCCARD; | 739 | hdev->bus = HCI_PCCARD; |
738 | hdev->driver_data = info; | 740 | hdev->driver_data = info; |
739 | SET_HCIDEV_DEV(hdev, &info->p_dev->dev); | 741 | SET_HCIDEV_DEV(hdev, &info->p_dev->dev); |
740 | 742 | ||
@@ -867,11 +869,9 @@ static int bluecard_probe(struct pcmcia_device *link) | |||
867 | 869 | ||
868 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 870 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
869 | link->io.NumPorts1 = 8; | 871 | link->io.NumPorts1 = 8; |
870 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT; | 872 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; |
871 | link->irq.IRQInfo1 = IRQ_LEVEL_ID; | ||
872 | 873 | ||
873 | link->irq.Handler = bluecard_interrupt; | 874 | link->irq.Handler = bluecard_interrupt; |
874 | link->irq.Instance = info; | ||
875 | 875 | ||
876 | link->conf.Attributes = CONF_ENABLE_IRQ; | 876 | link->conf.Attributes = CONF_ENABLE_IRQ; |
877 | link->conf.IntType = INT_MEMORY_AND_IO; | 877 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -905,22 +905,16 @@ static int bluecard_config(struct pcmcia_device *link) | |||
905 | break; | 905 | break; |
906 | } | 906 | } |
907 | 907 | ||
908 | if (i != 0) { | 908 | if (i != 0) |
909 | cs_error(link, RequestIO, i); | ||
910 | goto failed; | 909 | goto failed; |
911 | } | ||
912 | 910 | ||
913 | i = pcmcia_request_irq(link, &link->irq); | 911 | i = pcmcia_request_irq(link, &link->irq); |
914 | if (i != 0) { | 912 | if (i != 0) |
915 | cs_error(link, RequestIRQ, i); | ||
916 | link->irq.AssignedIRQ = 0; | 913 | link->irq.AssignedIRQ = 0; |
917 | } | ||
918 | 914 | ||
919 | i = pcmcia_request_configuration(link, &link->conf); | 915 | i = pcmcia_request_configuration(link, &link->conf); |
920 | if (i != 0) { | 916 | if (i != 0) |
921 | cs_error(link, RequestConfiguration, i); | ||
922 | goto failed; | 917 | goto failed; |
923 | } | ||
924 | 918 | ||
925 | if (bluecard_open(info) != 0) | 919 | if (bluecard_open(info) != 0) |
926 | goto failed; | 920 | goto failed; |