From: H Hartley Sweeten Date: Tue, 26 Mar 2013 22:00:40 +0000 (-0700) Subject: staging: comedi: rtd520: remove dioStatus from private data X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=360235af62177406ae6132c0bead2d45306f26d4;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: rtd520: remove dioStatus from private data This variable in the private data is not necessary. Remove it. Signed-off-by: H Hartley Sweeten Reviewed-by: 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 007d3a61f2d1..43b8cebf89dd 100644 --- a/drivers/staging/comedi/drivers/rtd520.c +++ b/drivers/staging/comedi/drivers/rtd520.c @@ -417,7 +417,6 @@ struct rtdPrivate { u16 intMask; /* interrupt mask */ u16 intClearMask; /* interrupt clear mask */ u8 utcCtrl[4]; /* crtl mode for 3 utc + read back */ - u8 dioStatus; /* could be read back (dio0Ctrl) */ unsigned fifoLen; }; @@ -1292,11 +1291,13 @@ static int rtd_dio_insn_config(struct comedi_device *dev, } /* TODO support digital match interrupts and strobes */ - devpriv->dioStatus = 0x01; /* set direction */ - writew(devpriv->dioStatus, devpriv->las0 + LAS0_DIO_STATUS); + + /* set direction */ + writew(0x01, devpriv->las0 + LAS0_DIO_STATUS); writew(s->io_bits & 0xff, devpriv->las0 + LAS0_DIO0_CTRL); - devpriv->dioStatus = 0x00; /* clear interrupts */ - writew(devpriv->dioStatus, devpriv->las0 + LAS0_DIO_STATUS); + + /* clear interrupts */ + writew(0x00, devpriv->las0 + LAS0_DIO_STATUS); /* port1 can only be all input or all output */ @@ -1335,8 +1336,7 @@ static void rtd_init_board(struct comedi_device *dev) writel(0, devpriv->las0 + LAS0_DAC1_RESET); writel(0, devpriv->las0 + LAS0_DAC2_RESET); /* clear digital IO fifo */ - devpriv->dioStatus = 0; - writew(devpriv->dioStatus, devpriv->las0 + LAS0_DIO_STATUS); + writew(0, devpriv->las0 + LAS0_DIO_STATUS); devpriv->utcCtrl[0] = (0 << 6) | 0x30; devpriv->utcCtrl[1] = (1 << 6) | 0x30; devpriv->utcCtrl[2] = (2 << 6) | 0x30;