From ba9d29fe102d4b4e388ba510f4a71b8b737144b9 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Fri, 20 Jun 2014 11:10:33 -0700 Subject: [PATCH] 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: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mite.h | 5 ----- drivers/staging/comedi/drivers/ni_65xx.c | 2 +- drivers/staging/comedi/drivers/ni_660x.c | 4 ++-- drivers/staging/comedi/drivers/ni_labpc_pci.c | 2 +- drivers/staging/comedi/drivers/ni_pcidio.c | 2 +- drivers/staging/comedi/drivers/ni_pcimio.c | 2 +- 6 files changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/staging/comedi/drivers/mite.h b/drivers/staging/comedi/drivers/mite.h index e6e58e989b73..9968d8dc53af 100644 --- a/drivers/staging/comedi/drivers/mite.h +++ b/drivers/staging/comedi/drivers/mite.h @@ -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; diff --git a/drivers/staging/comedi/drivers/ni_65xx.c b/drivers/staging/comedi/drivers/ni_65xx.c index 9a139d6b8ef4..6e28603339b4 100644 --- a/drivers/staging/comedi/drivers/ni_65xx.c +++ b/drivers/staging/comedi/drivers/ni_65xx.c @@ -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)); diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index 634cde83a02b..5f80bcabd40d 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -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; diff --git a/drivers/staging/comedi/drivers/ni_labpc_pci.c b/drivers/staging/comedi/drivers/ni_labpc_pci.c index 739597068297..384c427092e4 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_pci.c +++ b/drivers/staging/comedi/drivers/ni_labpc_pci.c @@ -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) diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c b/drivers/staging/comedi/drivers/ni_pcidio.c index b03105ab0e50..b9de13235019 100644 --- a/drivers/staging/comedi/drivers/ni_pcidio.c +++ b/drivers/staging/comedi/drivers/ni_pcidio.c @@ -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); diff --git a/drivers/staging/comedi/drivers/ni_pcimio.c b/drivers/staging/comedi/drivers/ni_pcimio.c index 5afa2c62bad0..d72cc6f8aab2 100644 --- a/drivers/staging/comedi/drivers/ni_pcimio.c +++ b/drivers/staging/comedi/drivers/ni_pcimio.c @@ -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); -- 2.30.2