RE: staging: comedi: Fix boolean/logical and mix-up.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, November 26, 2013 7:57 PM, Dave Jones wrote:
> Introduced in commit b3ff824a81e8.
>
> Signed-off-by: Dave Jones <davej@xxxxxxxxxxxxxxxxx>
>
> diff --git a/drivers/staging/comedi/drivers/pcl730.c b/drivers/staging/comedi/drivers/pcl730.c
> index d041b714db29..2baaf1db6fbf 100644
> --- a/drivers/staging/comedi/drivers/pcl730.c
> +++ b/drivers/staging/comedi/drivers/pcl730.c
> @@ -173,11 +173,11 @@ static int pcl730_do_insn_bits(struct comedi_device *dev,
>  	if (mask) {
>  		if (mask & 0x00ff)
>  			outb(s->state & 0xff, dev->iobase + reg);
> -		if ((mask & 0xff00) & (s->n_chan > 8))
> +		if ((mask & 0xff00) && (s->n_chan > 8))
>  			outb((s->state >> 8) & 0xff, dev->iobase + reg + 1);
> -		if ((mask & 0xff0000) & (s->n_chan > 16))
> +		if ((mask & 0xff0000) && (s->n_chan > 16))
>  			outb((s->state >> 16) & 0xff, dev->iobase + reg + 2);
> -		if ((mask & 0xff000000) & (s->n_chan > 24))
> +		if ((mask & 0xff000000) && (s->n_chan > 24))
>  			outb((s->state >> 24) & 0xff, dev->iobase + reg + 3);
>  	}

My bad...

Added Greg KH and the staging devel list to the CCs.

Acked-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>

 
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux