On Monday, March 25, 2013 3:20 AM, Ian Abbott wrote: > 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. I like that better. I need to check the other comedi drivers to see if this should maybe be a generic "comedi_range_is_unipolar" helper in comedidev.h. Regards, Hartley _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel