Commit 6bcd56b7 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

staging: kpc2000: remove SetBackEndControl() function

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 078ef50c
......@@ -197,10 +197,14 @@ 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);
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;
}
......@@ -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");
......
......@@ -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_ */
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