]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: comedi_buf: don't expose comedi_buf_write_n_allocated()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 9 Jan 2013 20:32:18 +0000 (13:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2013 00:53:59 +0000 (16:53 -0800)
This helper function is only called by the comedi core in comedi_buf.c
and comedi_fops.c. For aesthetic reasons, move it to comedi_buf.c and
remove the inline. Move the prototype from comedidev.h to comedi_internal.h
so it's not exposed outside the comedi core.

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/comedi_internal.h
drivers/staging/comedi/comedidev.h

index 891cf89efa9166cbd09baa17eddb98ce5885e234..c562346e4429a97374fbb0c441cdcfc8bddd23a2 100644 (file)
@@ -249,6 +249,11 @@ static unsigned int comedi_buf_munge(struct comedi_async *async,
        return count;
 }
 
+unsigned int comedi_buf_write_n_allocated(struct comedi_async *async)
+{
+       return async->buf_write_alloc_count - async->buf_write_count;
+}
+
 /* transfers a chunk from writer to filled buffer space */
 unsigned comedi_buf_write_free(struct comedi_async *async, unsigned int nbytes)
 {
index 9e94f2deb3bee875c3859ec09e7aec47bec6149f..5e6f05b30e6c8bdbe9b7205d1a122bf602b457a9 100644 (file)
@@ -17,6 +17,7 @@ int comedi_find_board_minor(struct device *hardware_device);
 int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
                     unsigned long new_size);
 void comedi_buf_reset(struct comedi_async *async);
+unsigned int comedi_buf_write_n_allocated(struct comedi_async *async);
 
 extern unsigned int comedi_default_buf_size_kb;
 extern unsigned int comedi_default_buf_maxsize_kb;
index 4d5a35ebc3117e2623a906a1b19645278f63cb50..140678da55d491cda251d17f6fb944ad3fd544ee 100644 (file)
@@ -448,10 +448,6 @@ void comedi_buf_memcpy_to(struct comedi_async *async, unsigned int offset,
                          const void *source, unsigned int num_bytes);
 void comedi_buf_memcpy_from(struct comedi_async *async, unsigned int offset,
                            void *destination, unsigned int num_bytes);
-static inline unsigned comedi_buf_write_n_allocated(struct comedi_async *async)
-{
-       return async->buf_write_alloc_count - async->buf_write_count;
-}
 
 int comedi_alloc_subdevice_minor(struct comedi_device *dev,
                                 struct comedi_subdevice *s);