From: David Schleef Date: Thu, 24 May 2001 01:41:12 +0000 (+0000) Subject: removed di_unpack, do_pack. X-Git-Tag: r0_7_59~28 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c2e46395989059336c84f608e4011151efbcdcca;p=comedi.git removed di_unpack, do_pack. --- diff --git a/comedi/comedi_ksyms.c b/comedi/comedi_ksyms.c index c46f0e54..885d447e 100644 --- a/comedi/comedi_ksyms.c +++ b/comedi/comedi_ksyms.c @@ -45,8 +45,6 @@ EXPORT_SYMBOL(comedi_error); EXPORT_SYMBOL(comedi_eobuf); EXPORT_SYMBOL(comedi_eos); EXPORT_SYMBOL(comedi_event); -EXPORT_SYMBOL(do_pack); -EXPORT_SYMBOL(di_unpack); EXPORT_SYMBOL(range_bipolar10); EXPORT_SYMBOL(range_bipolar5); EXPORT_SYMBOL(range_bipolar2_5); diff --git a/comedi/drivers.c b/comedi/drivers.c index 2372341a..80d1b48d 100644 --- a/comedi/drivers.c +++ b/comedi/drivers.c @@ -61,7 +61,6 @@ int comedi_device_detach(comedi_device *dev) { int i; comedi_subdevice *s; - comedi_async *async; if(!dev->attached) return 0; @@ -74,11 +73,9 @@ int comedi_device_detach(comedi_device *dev) for(i=0;in_subdevices;i++){ s=dev->subdevices+i; - if(s->async) - { - async = s->async; - rvfree(async->prealloc_buf,async->prealloc_bufsz); - kfree(async); + if(s->async){ + rvfree(s->async->prealloc_buf,s->async->prealloc_bufsz); + kfree(s->async); } } @@ -358,38 +355,6 @@ static int poll_invalid(comedi_device *dev,comedi_subdevice *s) return -EINVAL; } -/* helper functions for drivers */ - -int di_unpack(unsigned int bits,comedi_trig *it) -{ - int chan; - int i; - - for(i=0;in_chan;i++){ - chan=CR_CHAN(it->chanlist[i]); - it->data[i]=(bits>>chan)&1; - } - - return i; -} - -int do_pack(unsigned int *bits,comedi_trig *it) -{ - int chan; - int mask; - int i; - - for(i=0;in_chan;i++){ - chan=CR_CHAN(it->chanlist[i]); - mask=1<data[i]) - (*bits) |=mask; - } - - return i; -} - static int insn_inval(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data) { return -EINVAL;