From bdc67c61cdc497f126aa2bb128aa11aee9ac796f Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 25 Sep 2002 01:56:00 +0000 Subject: [PATCH] Update buffer code to CVS --- comedi/drivers/amplc_pc236.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/comedi/drivers/amplc_pc236.c b/comedi/drivers/amplc_pc236.c index b5d753be..4570e236 100644 --- a/comedi/drivers/amplc_pc236.c +++ b/comedi/drivers/amplc_pc236.c @@ -290,6 +290,8 @@ static comedi_driver driver_amplc_pc236={ offset: sizeof(pc236_board), num_names: sizeof(pc236_boards) / sizeof(pc236_board), }; +COMEDI_INITCLEANUP(driver_amplc_pc236); + static int pc236_request_region(unsigned long from, unsigned long extent); static void pc236_intr_disable(comedi_device *dev); @@ -691,21 +693,9 @@ static void pc236_interrupt(int irq,void *d,struct pt_regs *regs) if(!pc236_intr_check(dev)) return; - *(sampl_t *)(s->async->data+s->async->buf_int_ptr)=0; - s->async->buf_int_ptr+=sizeof(sampl_t); - s->async->buf_int_count+=sizeof(sampl_t); - if(s->async->buf_int_ptr>=s->async->data_len){ - s->async->buf_int_ptr=0; - s->async->events |= COMEDI_CB_EOBUF; - } + comedi_buf_put(s->async,0); s->async->events |= COMEDI_CB_EOS; comedi_event(dev,s,s->async->events); } -/* - * A convenient macro that defines init_module() and cleanup_module(), - * as necessary. - */ -COMEDI_INITCLEANUP(driver_amplc_pc236); - -- 2.26.2