From: David Schleef Date: Thu, 21 Nov 2002 08:39:37 +0000 (+0000) Subject: Compilation fixes X-Git-Tag: r0_7_66~8 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=d011d08a11541f045b73a49f220b68605f73cac5;p=comedi.git Compilation fixes --- diff --git a/comedi/drivers/comedi_rt_timer.c b/comedi/drivers/comedi_rt_timer.c index a3279513..18acbdac 100644 --- a/comedi/drivers/comedi_rt_timer.c +++ b/comedi/drivers/comedi_rt_timer.c @@ -55,6 +55,9 @@ TODO: #include #include + +#include "comedi_fc.h" + #ifdef CONFIG_COMEDI_RTL_V1 #include #include @@ -65,6 +68,7 @@ TODO: #include #include + #ifndef RTLINUX_VERSION_CODE #define RTLINUX_VERSION_CODE 0 #endif @@ -124,7 +128,7 @@ static comedi_driver driver_timer={ driver_name: "comedi_rt_timer", attach: timer_attach, detach: timer_detach, - open: timer_open, +// open: timer_open, }; COMEDI_INITCLEANUP(driver_timer); @@ -210,10 +214,11 @@ static int timer_data_read(comedi_device *dev, comedi_cmd *cmd, comedi_error(dev, "read error"); return -EIO; } - if( s->flags & SDF_LSAMPL ) + if( s->flags & SDF_LSAMPL ){ cfc_write_long_to_buffer( s, data ); - else - cfc_write_to_buffer( s, data ); + }else{ + comedi_buf_put( s->async, data ); + } return 0; } @@ -226,11 +231,11 @@ static int timer_data_write(comedi_device *dev, comedi_cmd *cmd, unsigned int num_bytes; sampl_t data; lsampl_t long_data; + int ret; - if( s->flags & SDF_LSAMPL ) - { + if( s->flags & SDF_LSAMPL ) { num_bytes = cfc_read_array_from_buffer( s, &long_data, sizeof( long_data ) ); - }else + }else{ num_bytes = cfc_read_array_from_buffer( s, &data, sizeof( data ) ); long_data = data; }