From: H Hartley Sweeten Date: Tue, 10 Jul 2012 23:43:32 +0000 (-0700) Subject: staging: comedi: rtd520: remove RtdAdcClearFifo macro X-Git-Tag: firefly_0821_release~3680^2~2356^2~290 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=aa5372b8879e5c0e49728db8ce1b1cafc545caf4;p=firefly-linux-kernel-4.4.55.git staging: comedi: rtd520: remove RtdAdcClearFifo macro This macro uses the 'devpriv' macro which relies on a local variable having a specific name. Plus it's just a wrapper around a simple 'writel'. Remove the macro. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c index 3a7c030f8a93..eb46b5b667b7 100644 --- a/drivers/staging/comedi/drivers/rtd520.c +++ b/drivers/staging/comedi/drivers/rtd520.c @@ -406,10 +406,6 @@ struct rtdPrivate { /* Macros to access registers */ -/* Reset ADC FIFO */ -#define RtdAdcClearFifo(dev) \ - writel(0, devpriv->las0+LAS0_ADC_FIFO_CLEAR) - /* Set ADC start conversion source select (write only) */ #define RtdAdcConversionSource(dev, v) \ writel(v, devpriv->las0+LAS0_ADC_CONVERSION) @@ -804,7 +800,7 @@ static int rtd520_probe_fifo_depth(struct comedi_device *dev) static const unsigned limit = 0x2000; unsigned fifo_size = 0; - RtdAdcClearFifo(dev); + writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR); rtd_load_channelgain_list(dev, 1, &chanspec); RtdAdcConversionSource(dev, 0); /* software */ /* convert samples */ @@ -824,7 +820,7 @@ static int rtd520_probe_fifo_depth(struct comedi_device *dev) DRV_NAME); return -EIO; } - RtdAdcClearFifo(dev); + writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR); if (fifo_size != 0x400 && fifo_size != 0x2000) { printk (KERN_INFO "\ncomedi: %s: unexpected fifo size of %i, expected 1024 or 8192.\n", @@ -850,7 +846,7 @@ static int rtd_ai_rinsn(struct comedi_device *dev, int stat; /* clear any old fifo data */ - RtdAdcClearFifo(dev); + writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR); /* write channel to multiplexer and clear channel gain table */ rtd_load_channelgain_list(dev, 1, &insn->chanspec); @@ -1204,7 +1200,7 @@ static irqreturn_t rtd_interrupt(int irq, /* interrupt number (ignored) */ return IRQ_HANDLED; abortTransfer: - RtdAdcClearFifo(dev); /* clears full flag */ + writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR); s->async->events |= COMEDI_CB_ERROR; devpriv->aiCount = 0; /* stop and don't transfer any more */ /* fall into transferDone */ @@ -1495,7 +1491,7 @@ static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) } RtdDma0Reset(dev); /* reset onboard state */ #endif /* USE_DMA */ - RtdAdcClearFifo(dev); /* clear any old data */ + writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR); RtdInterruptOverrunClear(dev); devpriv->intCount = 0; @@ -2036,7 +2032,7 @@ static int rtd_attach(struct comedi_device *dev, struct comedi_devconfig *it) RtdInterruptClear(dev); /* clears bits set by mask */ RtdInterruptOverrunClear(dev); writel(0, devpriv->las0 + LAS0_CGT_CLEAR); - RtdAdcClearFifo(dev); + writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR); RtdDacClearFifo(dev, 0); RtdDacClearFifo(dev, 1); /* clear digital IO fifo */