drm/drm_crtc: return -EFAULT on copy_to_user errors
[safe/jmp/linux-2.6] / drivers / bluetooth / dtl1_cs.c
index b881a9c..ef044d5 100644 (file)
@@ -67,7 +67,6 @@ MODULE_LICENSE("GPL");
 
 typedef struct dtl1_info_t {
        struct pcmcia_device *p_dev;
-       dev_node_t node;
 
        struct hci_dev *hdev;
 
@@ -299,7 +298,9 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst)
        int iir, lsr;
        irqreturn_t r = IRQ_NONE;
 
-       BUG_ON(!info->hdev);
+       if (!info || !info->hdev)
+               /* our irq handler is shared */
+               return IRQ_NONE;
 
        iobase = info->p_dev->io.BasePort1;
 
@@ -483,7 +484,7 @@ static int dtl1_open(dtl1_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);
 
@@ -573,11 +574,6 @@ static int dtl1_probe(struct pcmcia_device *link)
 
        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
        link->io.NumPorts1 = 8;
-       link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
-       link->irq.IRQInfo1 = IRQ_LEVEL_ID;
-
-       link->irq.Handler = dtl1_interrupt;
-       link->irq.Instance = info;
 
        link->conf.Attributes = CONF_ENABLE_IRQ;
        link->conf.IntType = INT_MEMORY_AND_IO;
@@ -621,24 +617,17 @@ static int dtl1_config(struct pcmcia_device *link)
        if (pcmcia_loop_config(link, dtl1_confcheck, NULL) < 0)
                goto failed;
 
-       i = pcmcia_request_irq(link, &link->irq);
-       if (i != 0) {
-               cs_error(link, RequestIRQ, i);
-               link->irq.AssignedIRQ = 0;
-       }
+       i = pcmcia_request_irq(link, dtl1_interrupt);
+       if (i != 0)
+               goto failed;
 
        i = pcmcia_request_configuration(link, &link->conf);
-       if (i != 0) {
-               cs_error(link, RequestConfiguration, i);
+       if (i != 0)
                goto failed;
-       }
 
        if (dtl1_open(info) != 0)
                goto failed;
 
-       strcpy(info->node.dev_name, info->hdev->name);
-       link->dev_node = &info->node;
-
        return 0;
 
 failed: