From: Frank Mori Hess Date: Fri, 26 Jul 2002 00:24:21 +0000 (+0000) Subject: switched to use new COMEDI_CB_OVERFLOW flag X-Git-Tag: r0_7_66~123 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9aedf65e6228703bef75cb32ad1456e47edffebf;p=comedi.git switched to use new COMEDI_CB_OVERFLOW flag --- diff --git a/comedi/drivers/comedi_fc.c b/comedi/drivers/comedi_fc.c index b0cee9cd..72b8647f 100644 --- a/comedi/drivers/comedi_fc.c +++ b/comedi/drivers/comedi_fc.c @@ -1,9 +1,9 @@ /* - cfc.c + comedi_fc.c This is a place for code driver writers wish to share between - two or more drivers. cfc is short - for comedi-frank-common. + two or more drivers. fc is short + for frank-common. Author: Frank Mori Hess Copyright (C) 2002 Frank Mori Hess @@ -64,7 +64,7 @@ unsigned int cfc_write_array_to_buffer( comedi_subdevice *subd, void *data, retval = comedi_buf_write_alloc( async, num_bytes ); if( retval != num_bytes ) { - async->events |= COMEDI_CB_ERROR; + async->events |= COMEDI_CB_OVERFLOW; return 0; } @@ -106,10 +106,7 @@ unsigned int cfc_handle_events( comedi_device *dev, comedi_subdevice *subd ) { unsigned int events = subd->async->events; - if( events & COMEDI_CB_ERROR ) - events |= COMEDI_CB_EOA; - - if( events & COMEDI_CB_EOA ) + if( events & ( COMEDI_CB_EOA | COMEDI_CB_ERROR | COMEDI_CB_OVERFLOW ) ) subd->cancel( dev, subd ); comedi_event( dev, subd, events ); @@ -134,4 +131,3 @@ module_exit(comedi_fc_cleanup_module); EXPORT_SYMBOL( cfc_write_array_to_buffer ); EXPORT_SYMBOL( cfc_read_array_from_buffer ); EXPORT_SYMBOL( cfc_handle_events ); -