As this is only called twice, just call writel() like a normal driver should :) At the same time, clean up the formatting for the irq handler, as there is no need to have that be incorrect, it just hurts the eyes... Cc: Matt Sickler <Matt.Sickler@xxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- v2: no changes drivers/staging/kpc2000/kpc2000/core.c | 15 ++++++++++----- drivers/staging/kpc2000/kpc2000/dma_common_defs.h | 5 ----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index 0ab4cce73895..8e6db806f260 100644 --- a/drivers/staging/kpc2000/kpc2000/core.c +++ b/drivers/staging/kpc2000/kpc2000/core.c @@ -197,11 +197,15 @@ static int read_system_regs(struct kp2000_device *pcard) return 0; } -irqreturn_t kp2000_irq_handler(int irq, void *dev_id) +static irqreturn_t kp2000_irq_handler(int irq, void *dev_id) { - struct kp2000_device *pcard = (struct kp2000_device*)dev_id; - SetBackEndControl(pcard->dma_common_regs, KPC_DMA_CARD_IRQ_ENABLE | KPC_DMA_CARD_USER_INTERRUPT_MODE | KPC_DMA_CARD_USER_INTERRUPT_ACTIVE); - return IRQ_HANDLED; + struct kp2000_device *pcard = dev_id; + + writel(KPC_DMA_CARD_IRQ_ENABLE | + KPC_DMA_CARD_USER_INTERRUPT_MODE | + KPC_DMA_CARD_USER_INTERRUPT_ACTIVE, + pcard->dma_common_regs); + return IRQ_HANDLED; } static int kp2000_cdev_open(struct inode *inode, struct file *filp) @@ -484,7 +488,8 @@ static int kp2000_pcie_probe(struct pci_dev *pdev, //} //{ Step 12: Enable IRQs in HW - SetBackEndControl(pcard->dma_common_regs, KPC_DMA_CARD_IRQ_ENABLE | KPC_DMA_CARD_USER_INTERRUPT_MODE); + writel(KPC_DMA_CARD_IRQ_ENABLE | KPC_DMA_CARD_USER_INTERRUPT_MODE, + pcard->dma_common_regs); //} dev_dbg(&pcard->pdev->dev, "kp2000_pcie_probe() complete!\n"); diff --git a/drivers/staging/kpc2000/kpc2000/dma_common_defs.h b/drivers/staging/kpc2000/kpc2000/dma_common_defs.h index efc35c8e9d5c..21450e3d408f 100644 --- a/drivers/staging/kpc2000/kpc2000/dma_common_defs.h +++ b/drivers/staging/kpc2000/kpc2000/dma_common_defs.h @@ -21,9 +21,4 @@ #define KPC_DMA_CARD_S2C_INTERRUPT_STATUS_MASK 0x00FF0000 #define KPC_DMA_CARD_C2S_INTERRUPT_STATUS_MASK 0xFF000000 -static inline void SetBackEndControl(void __iomem *regs, u32 value) -{ - writel(value, regs + 0); -} - #endif /* KPC_DMA_COMMON_DEFS_H_ */ -- 2.21.0 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel