Commit ba9d29fe authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: mite.h: remove mite_irq()

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d1296561
......@@ -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;
......
......@@ -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));
......
......@@ -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;
......
......@@ -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)
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment