Re: [PATCH 17/51 v2] staging: comedi: ni_labpc: introduce labpc_range_is_unipolar()

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

 



On 2013-03-22 16:42, H Hartley Sweeten wrote:
+static bool labpc_range_is_unipolar(struct comedi_subdevice *s,
+				    unsigned int range)
+{
+	const struct comedi_lrange *lrange = s->range_table;
+	const struct comedi_krange *krange = &lrange->range[range];
+
+	if (krange->min < 0)
+		return false;
+	else
+		return true;
+}

That last bit could be simplified to:

	return krange->min >= 0;

but it doesn't really matter.

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@xxxxxxxxx>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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