]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: comedi: comedi_buf: don't expose comedi_buf_read_n_allocated()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 9 Jan 2013 20:31:46 +0000 (13:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2013 00:53:59 +0000 (16:53 -0800)
This helper function is only called in comedi_buf.c. Move it there and
make it static so it's not exposed globally.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-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 70d29016f8c0981e683e593b199b8f77dd81fbf6..891cf89efa9166cbd09baa17eddb98ce5885e234 100644 (file)
@@ -309,6 +309,11 @@ unsigned comedi_buf_read_alloc(struct comedi_async *async, unsigned nbytes)
 }
 EXPORT_SYMBOL(comedi_buf_read_alloc);
 
+static unsigned int comedi_buf_read_n_allocated(struct comedi_async *async)
+{
+       return async->buf_read_alloc_count - async->buf_read_count;
+}
+
 /* transfers control of a chunk from reader to free buffer space */
 unsigned comedi_buf_read_free(struct comedi_async *async, unsigned int nbytes)
 {
index cbfb6147cceca7c8e7380a109fe34d05d7fea07e..4d5a35ebc3117e2623a906a1b19645278f63cb50 100644 (file)
@@ -453,11 +453,6 @@ static inline unsigned comedi_buf_write_n_allocated(struct comedi_async *async)
        return async->buf_write_alloc_count - async->buf_write_count;
 }
 
-static inline unsigned comedi_buf_read_n_allocated(struct comedi_async *async)
-{
-       return async->buf_read_alloc_count - async->buf_read_count;
-}
-
 int comedi_alloc_subdevice_minor(struct comedi_device *dev,
                                 struct comedi_subdevice *s);
 void comedi_free_subdevice_minor(struct comedi_subdevice *s);