igb: correctly offset 82575 flow control watermarks by 16 bytes
[safe/jmp/linux-2.6] / drivers / bluetooth / dtl1_cs.c
index e30a633..4f02a6f 100644 (file)
@@ -297,6 +297,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst)
        unsigned char msr;
        int boguscount = 0;
        int iir, lsr;
+       irqreturn_t r = IRQ_NONE;
 
        BUG_ON(!info->hdev);
 
@@ -307,6 +308,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst)
        iir = inb(iobase + UART_IIR) & UART_IIR_ID;
        while (iir) {
 
+               r = IRQ_HANDLED;
                /* Clear interrupt */
                lsr = inb(iobase + UART_LSR);
 
@@ -343,11 +345,12 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst)
                info->ri_latch = msr & UART_MSR_RI;
                clear_bit(XMIT_WAITING, &(info->tx_state));
                dtl1_write_wakeup(info);
+               r = IRQ_HANDLED;
        }
 
        spin_unlock(&(info->lock));
 
-       return IRQ_HANDLED;
+       return r;
 }
 
 
@@ -412,6 +415,8 @@ static int dtl1_hci_send_frame(struct sk_buff *skb)
                hdev->stat.sco_tx++;
                nsh.type = 0x83;
                break;
+       default:
+               return -EILSEQ;
        };
 
        nsh.zero = 0;
@@ -568,11 +573,9 @@ 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_EXCLUSIVE | IRQ_HANDLE_PRESENT;
-       link->irq.IRQInfo1 = IRQ_LEVEL_ID;
+       link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
 
        link->irq.Handler = dtl1_interrupt;
-       link->irq.Instance = info;
 
        link->conf.Attributes = CONF_ENABLE_IRQ;
        link->conf.IntType = INT_MEMORY_AND_IO;
@@ -592,10 +595,11 @@ static void dtl1_detach(struct pcmcia_device *link)
 
 static int dtl1_confcheck(struct pcmcia_device *p_dev,
                          cistpl_cftable_entry_t *cf,
+                         cistpl_cftable_entry_t *dflt,
+                         unsigned int vcc,
                          void *priv_data)
 {
        if ((cf->io.nwin == 1) && (cf->io.win[0].len > 8)) {
-               p_dev->conf.ConfigIndex = cf->index;
                p_dev->io.BasePort1 = cf->io.win[0].base;
                p_dev->io.NumPorts1 = cf->io.win[0].len;        /*yo */
                p_dev->io.IOAddrLines = cf->io.flags & CISTPL_IO_LINES_MASK;
@@ -612,20 +616,16 @@ static int dtl1_config(struct pcmcia_device *link)
 
        /* Look for a generic full-sized window */
        link->io.NumPorts1 = 8;
-       if (!pcmcia_loop_config(link, dtl1_confcheck, NULL))
+       if (pcmcia_loop_config(link, dtl1_confcheck, NULL) < 0)
                goto failed;
 
        i = pcmcia_request_irq(link, &link->irq);
-       if (i != CS_SUCCESS) {
-               cs_error(link, RequestIRQ, i);
+       if (i != 0)
                link->irq.AssignedIRQ = 0;
-       }
 
        i = pcmcia_request_configuration(link, &link->conf);
-       if (i != CS_SUCCESS) {
-               cs_error(link, RequestConfiguration, i);
+       if (i != 0)
                goto failed;
-       }
 
        if (dtl1_open(info) != 0)
                goto failed;