From: H Hartley Sweeten Date: Tue, 10 Jul 2012 23:44:15 +0000 (-0700) Subject: staging: comedi: rtd520: remove RtdAdcConversionSource macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=99e3cfc278d8558974ede15f9ddc74d3fd7649eb;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git staging: comedi: rtd520: remove RtdAdcConversionSource 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 eb46b5b667b7..62748b9a8f82 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 */ -/* Set ADC start conversion source select (write only) */ -#define RtdAdcConversionSource(dev, v) \ - writel(v, devpriv->las0+LAS0_ADC_CONVERSION) - /* Set burst start source select (write only) */ #define RtdBurstStartSource(dev, v) \ writel(v, devpriv->las0+LAS0_BURST_START) @@ -802,7 +798,7 @@ static int rtd520_probe_fifo_depth(struct comedi_device *dev) writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR); rtd_load_channelgain_list(dev, 1, &chanspec); - RtdAdcConversionSource(dev, 0); /* software */ + writel(0, devpriv->las0 + LAS0_ADC_CONVERSION); /* convert samples */ for (i = 0; i < limit; ++i) { unsigned fifo_status; @@ -852,7 +848,7 @@ static int rtd_ai_rinsn(struct comedi_device *dev, rtd_load_channelgain_list(dev, 1, &insn->chanspec); /* set conversion source */ - RtdAdcConversionSource(dev, 0); /* software */ + writel(0, devpriv->las0 + LAS0_ADC_CONVERSION); /* convert n samples */ for (n = 0; n < insn->n; n++) { @@ -1208,7 +1204,7 @@ abortTransfer: transferDone: RtdPacerStopSource(dev, 0); /* stop on SOFTWARE stop */ RtdPacerStop(dev); /* Stop PACER */ - RtdAdcConversionSource(dev, 0); /* software trigger only */ + writel(0, devpriv->las0 + LAS0_ADC_CONVERSION); RtdInterruptMask(dev, 0); /* mask out SAMPLE */ #ifdef USE_DMA if (devpriv->flags & DMA0_ACTIVE) { @@ -1477,7 +1473,7 @@ static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) /* stop anything currently running */ RtdPacerStopSource(dev, 0); /* stop on SOFTWARE stop */ RtdPacerStop(dev); /* make sure PACER is stopped */ - RtdAdcConversionSource(dev, 0); /* software trigger only */ + writel(0, devpriv->las0 + LAS0_ADC_CONVERSION); RtdInterruptMask(dev, 0); #ifdef USE_DMA if (devpriv->flags & DMA0_ACTIVE) { /* cancel anything running */ @@ -1509,11 +1505,11 @@ static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) /*DPRINTK ("rtd520: Multi channel setup\n"); */ RtdPacerStartSource(dev, 0); /* software triggers pacer */ RtdBurstStartSource(dev, 1); /* PACER triggers burst */ - RtdAdcConversionSource(dev, 2); /* BURST triggers ADC */ + writel(2, devpriv->las0 + LAS0_ADC_CONVERSION); } else { /* single channel */ /*DPRINTK ("rtd520: single channel setup\n"); */ RtdPacerStartSource(dev, 0); /* software triggers pacer */ - RtdAdcConversionSource(dev, 1); /* PACER triggers ADC */ + writel(1, devpriv->las0 + LAS0_ADC_CONVERSION); } RtdAboutCounter(dev, devpriv->fifoLen / 2 - 1); /* 1/2 FIFO */ @@ -1675,7 +1671,7 @@ static int rtd_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s) RtdPacerStopSource(dev, 0); /* stop on SOFTWARE stop */ RtdPacerStop(dev); /* Stop PACER */ - RtdAdcConversionSource(dev, 0); /* software trigger only */ + writel(0, devpriv->las0 + LAS0_ADC_CONVERSION); RtdInterruptMask(dev, 0); devpriv->aiCount = 0; /* stop and don't transfer any more */ #ifdef USE_DMA