Merge branch 'kvm-updates/2.6.35' of git://git.kernel.org/pub/scm/virt/kvm/kvm
[safe/jmp/linux-2.6] / drivers / bluetooth / bluecard_cs.c
index 851de4d..6f907eb 100644 (file)
@@ -65,7 +65,6 @@ MODULE_LICENSE("GPL");
 
 typedef struct bluecard_info_t {
        struct pcmcia_device *p_dev;
-       dev_node_t node;
 
        struct hci_dev *hdev;
 
@@ -503,10 +502,9 @@ static irqreturn_t bluecard_interrupt(int irq, void *dev_inst)
        unsigned int iobase;
        unsigned char reg;
 
-       if (!info || !info->hdev) {
-               BT_ERR("Call of irq %d for unknown device", irq);
+       if (!info || !info->hdev)
+               /* our irq handler is shared */
                return IRQ_NONE;
-       }
 
        if (!test_bit(CARD_READY, &(info->hw_state)))
                return IRQ_HANDLED;
@@ -737,7 +735,7 @@ static int bluecard_open(bluecard_info_t *info)
 
        info->hdev = hdev;
 
-       hdev->type = HCI_PCCARD;
+       hdev->bus = HCI_PCCARD;
        hdev->driver_data = info;
        SET_HCIDEV_DEV(hdev, &info->p_dev->dev);
 
@@ -870,11 +868,6 @@ static int bluecard_probe(struct pcmcia_device *link)
 
        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
        link->io.NumPorts1 = 8;
-       link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
-       link->irq.IRQInfo1 = IRQ_LEVEL_ID;
-
-       link->irq.Handler = bluecard_interrupt;
-       link->irq.Instance = info;
 
        link->conf.Attributes = CONF_ENABLE_IRQ;
        link->conf.IntType = INT_MEMORY_AND_IO;
@@ -904,33 +897,24 @@ static int bluecard_config(struct pcmcia_device *link)
        for (n = 0; n < 0x400; n += 0x40) {
                link->io.BasePort1 = n ^ 0x300;
                i = pcmcia_request_io(link, &link->io);
-               if (i == CS_SUCCESS)
+               if (i == 0)
                        break;
        }
 
-       if (i != CS_SUCCESS) {
-               cs_error(link, RequestIO, i);
+       if (i != 0)
                goto failed;
-       }
 
-       i = pcmcia_request_irq(link, &link->irq);
-       if (i != CS_SUCCESS) {
-               cs_error(link, RequestIRQ, i);
-               link->irq.AssignedIRQ = 0;
-       }
+       i = pcmcia_request_irq(link, bluecard_interrupt);
+       if (i != 0)
+               goto failed;
 
        i = pcmcia_request_configuration(link, &link->conf);
-       if (i != CS_SUCCESS) {
-               cs_error(link, RequestConfiguration, i);
+       if (i != 0)
                goto failed;
-       }
 
        if (bluecard_open(info) != 0)
                goto failed;
 
-       strcpy(info->node.dev_name, info->hdev->name);
-       link->dev_node = &info->node;
-
        return 0;
 
 failed: