]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: kpc2000: remove SetBackEndControl() function
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 May 2019 08:47:16 +0000 (10:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2019 06:14:19 +0000 (08:14 +0200)
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@daktronics.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/kpc2000/kpc2000/core.c
drivers/staging/kpc2000/kpc2000/dma_common_defs.h

index 0ab4cce7389567138f2e5a5b59e98da36b9f12df..8e6db806f260899211259b110c8ed928f95f476e 100644 (file)
@@ -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");
index efc35c8e9d5c5d5db2114b762a935387dc8a854f..21450e3d408f09bf7de6842a383c58c84383ca5e 100644 (file)
@@ -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_ */