RE: [PATCH] staging: comedi: drivers: use comedi_fc.h cmdtest helpers

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

 



On Tuesday, September 25, 2012 2:15 AM, Ian Abbott wrote:
>On 2012-09-25 03:42, H Hartley Sweeten wrote:
>> +
>> +       /* Step 1 : check if triggers are trivially valid */
>> +
>> +       err |= cfc_check_trigger_src(&cmd->start_src, TRIG_NOW | TRIG_EXT);
>> +       err |= cfc_check_trigger_src(&cmd->scan_begin_src,
>> +                                       TRIG_TIMER | TRIG_FOLLOW);
>> +       err |= cfc_check_trigger_src(&cmd->convert_src, TRIG_TIMER);
>> +       err |= cfc_check_trigger_src(&cmd->scan_end_src, TRIG_COUNT);
>> +       err |= cfc_check_trigger_src(&cmd->stop_src, TRIG_COUNT | TRIG_NONE);
>> +
>> +       if (s_BoardInfos[dev->minor].i_InterruptFlag == 0)
>> +               err |= -ENIVAL;
>> +
>
> I assume you mean
>
>		err |= -EINVAL;

Of course... 

Hmm.. looks like this file never gets built. The addi_apci_3200 and
addi_apci_3300 drivers are not listed in the Makefile or Kconfig.

> although it looks a little odd.  We only care if it's non-zero or not, 
> so a simple assignment would work just as well.

The helpers I added to comedi_fc.h both return -EINVAL on error.
The err |= makes sure the error gets passed down to the final
check before the return.

If there are no other issues with this patch, and Greg doesn't need
me to break it up, I can just post an incremental patch to fix this.
The typo doesn't break anything since this file is not currently being
built.

I'll add the Kconfig and Makefile suff needed to build the addi data
3200 and 3300 drivers after the typo is fixed.

Regards,
Hartley

_______________________________________________
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