Skip to contentSkip to conversation

staging: missing parentheses?

PATCH New Roel Kluin 1 participant 1 message May 14, 2009 Staging

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 staging: missing parentheses?

Add missing parentheses.

---
The original code looks odd, but I am not sure whether my patch is correct. So please review.

drivers/staging/comedi/drivers/pcl818.c +2 -2
index 43a9d56..a6fbf43 100644
@@ -460,9 +460,9 @@ static int pcl818_ao_insn_write(struct comedi_device * dev, struct comedi_subdev
 	for (n = 0; n < insn->n; n++) {
 		devpriv->ao_readback[chan] = data[n];
 		outb((data[n] & 0x000f) << 4, dev->iobase +
-			(chan) ? PCL718_DA2_LO : PCL818_DA_LO);
+			(chan ? PCL718_DA2_LO : PCL818_DA_LO));
 		outb((data[n] & 0x0ff0) >> 4, dev->iobase +
-			(chan) ? PCL718_DA2_HI : PCL818_DA_HI);
+			(chan ? PCL718_DA2_HI : PCL818_DA_HI));
 	}
 
 	return n;