]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: comedi_buf: reorder exported function prototypes
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 9 Jan 2013 20:32:56 +0000 (13:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2013 00:54:00 +0000 (16:54 -0800)
For aesthetic reasons, reorder the prototypes for the exported
comedi_buf_* functions in comedidev.h to follow the function
declarations in comedi_buf.c.

Also, change a couple of the return values from 'unsigned' to
'unsigned int' to match the value actually returned.

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 c562346e4429a97374fbb0c441cdcfc8bddd23a2..ac5f0a91e93b16ced3ad87f19375368d5fdba6d7 100644 (file)
@@ -255,7 +255,8 @@ unsigned int comedi_buf_write_n_allocated(struct comedi_async *async)
 }
 
 /* transfers a chunk from writer to filled buffer space */
-unsigned comedi_buf_write_free(struct comedi_async *async, unsigned int nbytes)
+unsigned int comedi_buf_write_free(struct comedi_async *async,
+                                  unsigned int nbytes)
 {
        unsigned int allocated = comedi_buf_write_n_allocated(async);
 
@@ -294,7 +295,8 @@ unsigned int comedi_buf_read_n_available(struct comedi_async *async)
 EXPORT_SYMBOL(comedi_buf_read_n_available);
 
 /* allocates a chunk for the reader from filled (and munged) buffer space */
-unsigned comedi_buf_read_alloc(struct comedi_async *async, unsigned nbytes)
+unsigned int comedi_buf_read_alloc(struct comedi_async *async,
+                                  unsigned int nbytes)
 {
        unsigned int available;
 
@@ -320,7 +322,8 @@ static unsigned int comedi_buf_read_n_allocated(struct comedi_async *async)
 }
 
 /* transfers control of a chunk from reader to free buffer space */
-unsigned comedi_buf_read_free(struct comedi_async *async, unsigned int nbytes)
+unsigned int comedi_buf_read_free(struct comedi_async *async,
+                                 unsigned int nbytes)
 {
        unsigned int allocated;
 
index 140678da55d491cda251d17f6fb944ad3fd544ee..85b84b0d51ddae45e63ddec89103b2748afb8382 100644 (file)
@@ -435,15 +435,16 @@ comedi_to_usb_interface(struct comedi_device *dev)
        return dev->hw_dev ? to_usb_interface(dev->hw_dev) : NULL;
 }
 
-int comedi_buf_put(struct comedi_async *async, short x);
-int comedi_buf_get(struct comedi_async *async, short *x);
-
-unsigned int comedi_buf_write_alloc(struct comedi_async *async,
-                                   unsigned int nbytes);
-unsigned comedi_buf_write_free(struct comedi_async *async, unsigned int nbytes);
-unsigned comedi_buf_read_alloc(struct comedi_async *async, unsigned nbytes);
-unsigned comedi_buf_read_free(struct comedi_async *async, unsigned int nbytes);
-unsigned int comedi_buf_read_n_available(struct comedi_async *async);
+unsigned int comedi_buf_write_alloc(struct comedi_async *, unsigned int);
+unsigned int comedi_buf_write_free(struct comedi_async *, unsigned int);
+
+unsigned int comedi_buf_read_n_available(struct comedi_async *);
+unsigned int comedi_buf_read_alloc(struct comedi_async *, unsigned int);
+unsigned int comedi_buf_read_free(struct comedi_async *, unsigned int);
+
+int comedi_buf_put(struct comedi_async *, short);
+int comedi_buf_get(struct comedi_async *, short *);
+
 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,