[PATCH RESEND] staging: comedi: ni_daq_700: fix dio subdevice regression
H Hartley Sweeten
hartleys at visionengravers.com
Tue Oct 2 16:15:19 UTC 2012
On Tuesday, October 02, 2012 3:10 AM, Ian Abbott wrote:
> From: Fred Brooks <nsaspook at nsaspook.com>
>
> Here is a small patch to fix a problem caused by a previous patch that
> removed the callback function. The callback remove patch:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=1de02225358988e8fd48d1dc3fd12336bbae258a
>
> I finally booted my dev machine on the latest kernel (running Debian
> here so it's still on 3.2 normally) to test the ni_daq_700 driver with
> my test program and noticed this bug.
>
> Shift the DIO_R read result to bits 8..15 Digital direction
> configuration: channels 0-7 output, 8-15 input (8225 device emu as port
> A output, port B input, port C N/A).
>
> Cc: <stable at vger.kernel.org> # 3.6.x
> Signed-off-by: Fred Brooks <nsaspook at nsaspook.com>
> Signed-off-by: Ian Abbott <abbotti at mev.co.uk>
> ---
> I messed up the Cc: <stable at vger.kernel.org> line so I'm resending. Sorry.
> ---
> drivers/staging/comedi/drivers/ni_daq_700.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c
> index 2ba0ade..68d7c6a 100644
> --- a/drivers/staging/comedi/drivers/ni_daq_700.c
> +++ b/drivers/staging/comedi/drivers/ni_daq_700.c
> @@ -95,7 +95,7 @@ static int daq700_dio_insn_bits(struct comedi_device *dev,
> }
>
> data[1] = s->state & 0xff;
> - data[1] |= inb(dev->iobase + DIO_R);
> + data[1] |= inb(dev->iobase + DIO_R) << 8;
>
> return insn->n;
> }
Oops, sorry about that...
Reviewed-by: H Hartley Sweeten <hsweeten at visionengravers.com>
More information about the devel
mailing list