staging: comedi: comedi_buf: remove comedi_buf_put()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 22 Oct 2014 22:37:15 +0000 (15:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2014 08:03:15 +0000 (16:03 +0800)
All comedi drivers now use comedi_buf_write_samples() to add the samples to
the async buffer. Remove this unused function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_buf.c
drivers/staging/comedi/comedidev.h

index a41a414bef74265a1b566741efcded41ea31cfe3..f4b75d177d7f691209cc6d04af4da972b0dabafe 100644 (file)
@@ -427,21 +427,6 @@ unsigned int comedi_buf_read_free(struct comedi_subdevice *s,
 }
 EXPORT_SYMBOL_GPL(comedi_buf_read_free);
 
-int comedi_buf_put(struct comedi_subdevice *s, unsigned short x)
-{
-       struct comedi_async *async = s->async;
-       unsigned int n = __comedi_buf_write_alloc(s, sizeof(short), 1);
-
-       if (n < sizeof(short)) {
-               async->events |= COMEDI_CB_ERROR;
-               return 0;
-       }
-       *(unsigned short *)(async->prealloc_buf + async->buf_write_ptr) = x;
-       comedi_buf_write_free(s, sizeof(short));
-       return 1;
-}
-EXPORT_SYMBOL_GPL(comedi_buf_put);
-
 static void comedi_buf_memcpy_to(struct comedi_subdevice *s,
                                 const void *data, unsigned int num_bytes)
 {
index eee4dd45a122145790d088f4ed1ad3e2682d1f24..d60b83c26a28451e9c1080b25fa3da0689c536da 100644 (file)
@@ -441,8 +441,6 @@ unsigned int comedi_buf_read_n_available(struct comedi_subdevice *s);
 unsigned int comedi_buf_read_alloc(struct comedi_subdevice *s, unsigned int n);
 unsigned int comedi_buf_read_free(struct comedi_subdevice *s, unsigned int n);
 
-int comedi_buf_put(struct comedi_subdevice *s, unsigned short x);
-
 unsigned int comedi_write_array_to_buffer(struct comedi_subdevice *s,
                                          const void *data,
                                          unsigned int num_bytes);