summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorH Hartley Sweeten2016-04-20 19:36:36 +0200
committerGreg Kroah-Hartman2016-04-29 07:18:51 +0200
commit96f31530006492b2c753311431acf71df88b0cdd (patch)
treedd5370adf3f5041f1a337364419a1dee335b03fd /drivers/staging/comedi
parentstaging: comedi: ni_pcidio: remove redundant mite disarm/reset (diff)
downloadkernel-qcow2-linux-96f31530006492b2c753311431acf71df88b0cdd.tar.gz
kernel-qcow2-linux-96f31530006492b2c753311431acf71df88b0cdd.tar.xz
kernel-qcow2-linux-96f31530006492b2c753311431acf71df88b0cdd.zip
staging: comedi: mite: don't expose mite_dma_reset()
This function is only called by the mite driver. Remove the inline function from the header and make it static in the driver. Use the function in mite_prep_dma() instead of duplicating the code. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r--drivers/staging/comedi/drivers/mite.c12
-rw-r--r--drivers/staging/comedi/drivers/mite.h6
2 files changed, 8 insertions, 10 deletions
diff --git a/drivers/staging/comedi/drivers/mite.c b/drivers/staging/comedi/drivers/mite.c
index 6f31796f5bbf..2f24fae47b73 100644
--- a/drivers/staging/comedi/drivers/mite.c
+++ b/drivers/staging/comedi/drivers/mite.c
@@ -51,6 +51,12 @@
#include "mite.h"
+static void mite_dma_reset(struct mite_channel *mite_chan)
+{
+ writel(CHOR_DMARESET | CHOR_FRESET,
+ mite_chan->mite->mite_io_addr + MITE_CHOR(mite_chan->channel));
+}
+
struct mite_struct *mite_alloc(struct pci_dev *pcidev)
{
struct mite_struct *mite;
@@ -387,12 +393,10 @@ EXPORT_SYMBOL_GPL(mite_init_ring_descriptors);
void mite_prep_dma(struct mite_channel *mite_chan,
unsigned int num_device_bits, unsigned int num_memory_bits)
{
- unsigned int chor, chcr, mcr, dcr, lkcr;
+ unsigned int chcr, mcr, dcr, lkcr;
struct mite_struct *mite = mite_chan->mite;
- /* reset DMA and FIFO */
- chor = CHOR_DMARESET | CHOR_FRESET;
- writel(chor, mite->mite_io_addr + MITE_CHOR(mite_chan->channel));
+ mite_dma_reset(mite_chan);
/* short link chaining mode */
chcr = CHCR_SET_DMA_IE | CHCR_LINKSHORT | CHCR_SET_DONE_IE |
diff --git a/drivers/staging/comedi/drivers/mite.h b/drivers/staging/comedi/drivers/mite.h
index 394829957ed9..f168eceaa56f 100644
--- a/drivers/staging/comedi/drivers/mite.h
+++ b/drivers/staging/comedi/drivers/mite.h
@@ -337,10 +337,4 @@ enum CHSR_bits {
CHSR_DOERR = (3 << 0),
};
-static inline void mite_dma_reset(struct mite_channel *mite_chan)
-{
- writel(CHOR_DMARESET | CHOR_FRESET,
- mite_chan->mite->mite_io_addr + MITE_CHOR(mite_chan->channel));
-};
-
#endif