]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: comedidev.h: remove 'new_size' param from subdevice (*buf_change)
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 21 Jul 2014 18:48:32 +0000 (11:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jul 2014 22:33:23 +0000 (15:33 -0700)
This parameter is never used by any of the comedi drivers that provide a
(*buf_change) callback. If the 'new_size' is needed in the callback it can
be found from the 's->async->prealloc_bufsz' as done in the ni_pcidio driver.

Remove the unused parameter.

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_fops.c
drivers/staging/comedi/comedidev.h
drivers/staging/comedi/drivers.c
drivers/staging/comedi/drivers/ni_660x.c
drivers/staging/comedi/drivers/ni_pcidio.c
drivers/staging/comedi/drivers/ni_pcimio.c

index 84a1e429f24c0a177d054c807ffcf9d31baae6c2..2182c7463cdbdaa8bc0dbc5a38770d7f2ca67998 100644 (file)
@@ -268,7 +268,7 @@ static int resize_async_buffer(struct comedi_device *dev,
                return retval;
 
        if (s->buf_change) {
-               retval = s->buf_change(dev, s, new_size);
+               retval = s->buf_change(dev, s);
                if (retval < 0)
                        return retval;
        }
index 6bf5616beedb6a2a4c13cb4027d2b33d464a3697..f3999f5e809183c5163d3d25fd8221a9cd634a90 100644 (file)
@@ -77,8 +77,7 @@ struct comedi_subdevice {
        int (*cancel)(struct comedi_device *, struct comedi_subdevice *);
 
        /* called when the buffer changes */
-       int (*buf_change)(struct comedi_device *dev,
-                         struct comedi_subdevice *s, unsigned long new_size);
+       int (*buf_change)(struct comedi_device *, struct comedi_subdevice *);
 
        void (*munge)(struct comedi_device *dev, struct comedi_subdevice *s,
                      void *data, unsigned int num_bytes,
index 6ec4a4176e73c781b6af3d185098b61d24a9d84c..42ddf1332ce89dee17a2a580c5b0d9a1858cc8a5 100644 (file)
@@ -320,7 +320,7 @@ static int __comedi_device_postconfig_async(struct comedi_device *dev,
                return -ENOMEM;
        }
        if (s->buf_change) {
-               ret = s->buf_change(dev, s, buf_size);
+               ret = s->buf_change(dev, s);
                if (ret < 0)
                        return ret;
        }
index 6b8c702f20080ddb4bd9ff9e709c07146a446b22..20fe692fd8f0aff75c5986314f556394f73bd242 100644 (file)
@@ -825,8 +825,7 @@ static int ni_660x_input_poll(struct comedi_device *dev,
 }
 
 static int ni_660x_buf_change(struct comedi_device *dev,
-                             struct comedi_subdevice *s,
-                             unsigned long new_size)
+                             struct comedi_subdevice *s)
 {
        struct ni_660x_private *devpriv = dev->private;
        struct ni_gpct *counter = s->private;
index 2bf86911cb6bc79db19d58645edfe70824649ccc..352c60fa58b6f6ed527b147fdcce4d856093fc49 100644 (file)
@@ -787,7 +787,7 @@ static int ni_pcidio_cancel(struct comedi_device *dev,
 }
 
 static int ni_pcidio_change(struct comedi_device *dev,
-                           struct comedi_subdevice *s, unsigned long new_size)
+                           struct comedi_subdevice *s)
 {
        struct nidio96_private *devpriv = dev->private;
        int ret;
index a902a38913513b19b56f4afb07441c7d66c6c53b..22c0e95dc17455f09dbfd79cb4d90c2ce2b18b1b 100644 (file)
@@ -977,8 +977,7 @@ static const struct ni_board_struct ni_boards[] = {
 #include "ni_mio_common.c"
 
 static int pcimio_ai_change(struct comedi_device *dev,
-                           struct comedi_subdevice *s,
-                           unsigned long new_size)
+                           struct comedi_subdevice *s)
 {
        struct ni_private *devpriv = dev->private;
        int ret;
@@ -991,8 +990,7 @@ static int pcimio_ai_change(struct comedi_device *dev,
 }
 
 static int pcimio_ao_change(struct comedi_device *dev,
-                           struct comedi_subdevice *s,
-                           unsigned long new_size)
+                           struct comedi_subdevice *s)
 {
        struct ni_private *devpriv = dev->private;
        int ret;
@@ -1005,8 +1003,7 @@ static int pcimio_ao_change(struct comedi_device *dev,
 }
 
 static int pcimio_gpct0_change(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              unsigned long new_size)
+                              struct comedi_subdevice *s)
 {
        struct ni_private *devpriv = dev->private;
        int ret;
@@ -1019,8 +1016,7 @@ static int pcimio_gpct0_change(struct comedi_device *dev,
 }
 
 static int pcimio_gpct1_change(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              unsigned long new_size)
+                              struct comedi_subdevice *s)
 {
        struct ni_private *devpriv = dev->private;
        int ret;
@@ -1033,8 +1029,7 @@ static int pcimio_gpct1_change(struct comedi_device *dev,
 }
 
 static int pcimio_dio_change(struct comedi_device *dev,
-                            struct comedi_subdevice *s,
-                            unsigned long new_size)
+                            struct comedi_subdevice *s)
 {
        struct ni_private *devpriv = dev->private;
        int ret;