Commit b0a0d0bc authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: addi_apci_3120: rename APCI3120_RD_STATUS



For aesthetics, rename this define used for the status register offset.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 08595f9d
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
@@ -81,7 +81,6 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
#define APCI3120_EOS_MODE		2
#define APCI3120_DMA_MODE		3

#define APCI3120_RD_STATUS		0x02
#define APCI3120_RD_FIFO		0x00

/* status register bits */
@@ -99,7 +98,6 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
#define APCI3120_TIMER_DISABLE		0
#define APCI3120_TIMER_ENABLE		1

#define APCI3120_RD_STATUS		0x02
#define APCI3120_FC_TIMER		0x1000

#define APCI3120_COUNTER		3
@@ -146,7 +144,7 @@ static int apci3120_ai_eoc(struct comedi_device *dev,
{
	unsigned int status;

	status = inw(dev->iobase + APCI3120_RD_STATUS);
	status = inw(dev->iobase + APCI3120_STATUS_REG);
	if ((status & APCI3120_EOC) == 0)
		return 0;
	return -EBUSY;
@@ -220,7 +218,7 @@ static int apci3120_reset(struct comedi_device *dev)
	outw(devpriv->ctrl, dev->iobase + APCI3120_CTRL_REG);

	apci3120_ai_reset_fifo(dev);
	inw(dev->iobase + APCI3120_RD_STATUS);	/*  flush A/D status register */
	inw(dev->iobase + APCI3120_STATUS_REG);

	return 0;
}
@@ -251,7 +249,7 @@ static int apci3120_cancel(struct comedi_device *dev,
	outb(devpriv->mode, dev->iobase + APCI3120_MODE_REG);

	apci3120_ai_reset_fifo(dev);
	inw(dev->iobase + APCI3120_RD_STATUS);
	inw(dev->iobase + APCI3120_STATUS_REG);
	devpriv->ui_DmaActualBuffer = 0;

	devpriv->ai_running = 0;
@@ -753,7 +751,7 @@ static irqreturn_t apci3120_interrupt(int irq, void *d)
	unsigned short int_daq;
	unsigned int int_amcc;

	int_daq = inw(dev->iobase + APCI3120_RD_STATUS) & 0xf000;	/*  get IRQ reasons */
	int_daq = inw(dev->iobase + APCI3120_STATUS_REG) & 0xf000;
	int_amcc = inl(devpriv->amcc + AMCC_OP_REG_INTCSR);

	if ((!int_daq) && (!(int_amcc & ANY_S593X_INT))) {
@@ -1030,8 +1028,7 @@ static int apci3120_read_insn_timer(struct comedi_device *dev,
	if (devpriv->b_Timer2Mode == APCI3120_TIMER) {
		data[0] = apci3120_timer_read(dev, 2);
	} else {			/*  Read watch dog status */

		us_StatusValue = inw(dev->iobase + APCI3120_RD_STATUS);
		us_StatusValue = inw(dev->iobase + APCI3120_STATUS_REG);
		us_StatusValue =
			((us_StatusValue & APCI3120_FC_TIMER) >> 12) & 1;
		if (us_StatusValue == 1)
@@ -1049,7 +1046,7 @@ static int apci3120_di_insn_bits(struct comedi_device *dev,
	unsigned int val;

	/* the input channels are bits 11:8 of the status reg */
	val = inw(dev->iobase + APCI3120_RD_STATUS);
	val = inw(dev->iobase + APCI3120_STATUS_REG);
	data[1] = (val >> 8) & 0xf;

	return insn->n;
@@ -1080,7 +1077,7 @@ static int apci3120_ao_ready(struct comedi_device *dev,
{
	unsigned int status;

	status = inw(dev->iobase + APCI3120_RD_STATUS);
	status = inw(dev->iobase + APCI3120_STATUS_REG);
	if (status & 0x0001)	/* waiting for DA_READY */
		return 0;
	return -EBUSY;
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#define APCI3120_CTRL_GATE(x)			(1 << (12 + (x)))
#define APCI3120_CTRL_PR(x)			(((x) & 0xf) << 8)
#define APCI3120_CTRL_PA(x)			(((x) & 0xf) << 0)
#define APCI3120_STATUS_REG			0x02
#define APCI3120_STATUS_TO_VERSION(x)		(((x) >> 4) & 0xf)
#define APCI3120_TIMER_REG			0x04
#define APCI3120_CHANLIST_REG			0x06
@@ -360,7 +361,7 @@ static int apci3120_auto_attach(struct comedi_device *dev,
		}
	}

	status = inw(dev->iobase + APCI3120_RD_STATUS);
	status = inw(dev->iobase + APCI3120_STATUS_REG);
	if (APCI3120_STATUS_TO_VERSION(status) == APCI3120_REVB ||
	    context == BOARD_APCI3001)
		devpriv->osc_base = APCI3120_REVB_OSC_BASE;