]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: mite.h: remove mite_irq()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 20 Jun 2014 18:10:33 +0000 (11:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Jun 2014 21:17:59 +0000 (14:17 -0700)
This inline function simply returns the 'irq' of the struct pci_dev pointer
that is stored in struct mite_struct. This pci_dev pointer is the same as
the one that is already available in the (*auto_attach) functions where
mite_irq() is used.

Use the pci_dev pointer directly to get the irq and remove the unnecessary
inline function to remove the indirection.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/mite.h
drivers/staging/comedi/drivers/ni_65xx.c
drivers/staging/comedi/drivers/ni_660x.c
drivers/staging/comedi/drivers/ni_labpc_pci.c
drivers/staging/comedi/drivers/ni_pcidio.c
drivers/staging/comedi/drivers/ni_pcimio.c

index e6e58e989b73a49670bddd9e13def37132167fca..9968d8dc53afcb750600c5dbaa5aaf3c7c2dd09d 100644 (file)
@@ -70,11 +70,6 @@ static inline void mite_free(struct mite_struct *mite)
        kfree(mite);
 }
 
-static inline unsigned int mite_irq(struct mite_struct *mite)
-{
-       return mite->pcidev->irq;
-};
-
 static inline unsigned int mite_device_id(struct mite_struct *mite)
 {
        return mite->pcidev->device;
index 9a139d6b8ef4e7aa68db819788ab504c119f7088..6e28603339b4fb309638d5aecce67d29f03f8dfb 100644 (file)
@@ -596,7 +596,7 @@ static int ni_65xx_auto_attach(struct comedi_device *dev,
                return ret;
        }
 
-       dev->irq = mite_irq(devpriv->mite);
+       dev->irq = pcidev->irq;
        dev_info(dev->class_dev, "board: %s, ID=0x%02x", dev->board_name,
               readb(devpriv->mite->daq_io_addr + ID_Register));
 
index 634cde83a02ba6eec64399cc546ca44781ffdab9..5f80bcabd40dc60b2ec3619e3a6c3ccf56c0d6cc 100644 (file)
@@ -1170,13 +1170,13 @@ static int ni_660x_auto_attach(struct comedi_device *dev,
        for (i = 0; i < board->n_chips; ++i)
                set_tio_counterswap(dev, i);
 
-       ret = request_irq(mite_irq(devpriv->mite), ni_660x_interrupt,
+       ret = request_irq(pcidev->irq, ni_660x_interrupt,
                          IRQF_SHARED, "ni_660x", dev);
        if (ret < 0) {
                dev_warn(dev->class_dev, " irq not available\n");
                return ret;
        }
-       dev->irq = mite_irq(devpriv->mite);
+       dev->irq = pcidev->irq;
        global_interrupt_config_bits = Global_Int_Enable_Bit;
        if (board->n_chips > 1)
                global_interrupt_config_bits |= Cascade_Int_Enable_Bit;
index 739597068297d2d2ee7c87415846afc8c6f6806d..384c427092e4ea82be8e61152b8f130727c5f904 100644 (file)
@@ -84,7 +84,7 @@ static int labpc_pci_auto_attach(struct comedi_device *dev,
                return ret;
        dev->iobase = (unsigned long)devpriv->mite->daq_io_addr;
 
-       return labpc_common_attach(dev, mite_irq(devpriv->mite), IRQF_SHARED);
+       return labpc_common_attach(dev, pcidev->irq, IRQF_SHARED);
 }
 
 static void labpc_pci_detach(struct comedi_device *dev)
index b03105ab0e50a68876630641cc92e09c5d34c509..b9de132350198114057c89847358b59f928326ac 100644 (file)
@@ -1024,7 +1024,7 @@ static int nidio_auto_attach(struct comedi_device *dev,
        s->async_dma_dir = DMA_BIDIRECTIONAL;
        s->poll = &ni_pcidio_poll;
 
-       irq = mite_irq(devpriv->mite);
+       irq = pcidev->irq;
        if (irq) {
                ret = request_irq(irq, nidio_interrupt, IRQF_SHARED,
                                  dev->board_name, dev);
index 5afa2c62bad03870bf962f78c5d187653b8dcbc1..d72cc6f8aab2db5087a97800a2bebeb6c635988b 100644 (file)
@@ -1256,7 +1256,7 @@ static int pcimio_auto_attach(struct comedi_device *dev,
        if (board->reg_type == ni_reg_6143)
                init_6143(dev);
 
-       irq = mite_irq(devpriv->mite);
+       irq = pcidev->irq;
        if (irq) {
                ret = request_irq(irq, ni_E_interrupt, IRQF_SHARED,
                                  dev->board_name, dev);