staging: comedi: comedi_buf: remove comedi_buf_write_alloc_strict
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 9 Jan 2013 20:28:20 +0000 (13:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2013 00:53:58 +0000 (16:53 -0800)
This function is only called by comedi_buf_put(). Remove it and just
call __comedi_buf_write_alloc() directly with the strict flag set.

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 2f38a87fbcf0d35126103c813afa6c20c23504f9..1b269a7a07ac31770f33caeb37c2477053b90070 100644 (file)
@@ -194,13 +194,6 @@ unsigned int comedi_buf_write_alloc(struct comedi_async *async,
 }
 EXPORT_SYMBOL(comedi_buf_write_alloc);
 
-/* allocates nothing unless it can completely fulfill the request */
-unsigned int comedi_buf_write_alloc_strict(struct comedi_async *async,
-                                          unsigned int nbytes)
-{
-       return __comedi_buf_write_alloc(async, nbytes, 1);
-}
-
 /* munging is applied to data by core as it passes between user
  * and kernel space */
 static unsigned int comedi_buf_munge(struct comedi_async *async,
@@ -319,7 +312,7 @@ EXPORT_SYMBOL(comedi_buf_read_free);
 
 int comedi_buf_put(struct comedi_async *async, short x)
 {
-       unsigned int n = comedi_buf_write_alloc_strict(async, sizeof(short));
+       unsigned int n = __comedi_buf_write_alloc(async, sizeof(short), 1);
 
        if (n < sizeof(short)) {
                async->events |= COMEDI_CB_ERROR;
index bf0fd8df91db54e696fe44d9b418fe5301311033..cbfb6147cceca7c8e7380a109fe34d05d7fea07e 100644 (file)
@@ -440,8 +440,6 @@ int comedi_buf_get(struct comedi_async *async, short *x);
 
 unsigned int comedi_buf_write_alloc(struct comedi_async *async,
                                    unsigned int nbytes);
-unsigned int comedi_buf_write_alloc_strict(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);