提交 a55e9067 编写于 作者: H H Hartley Sweeten 提交者: Greg Kroah-Hartman

staging: comedi: ni_pcimio: remove forward declarations

Move some functions to avoid the need for the forward declarations.
Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: NIan Abbott <abbotti@mev.co.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 3dc50c1a
...@@ -1050,18 +1050,75 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -1050,18 +1050,75 @@ static const struct ni_board_struct ni_boards[] = {
#include "ni_mio_common.c" #include "ni_mio_common.c"
static int pcimio_ai_change(struct comedi_device *dev, static int pcimio_ai_change(struct comedi_device *dev,
struct comedi_subdevice *s, unsigned long new_size); struct comedi_subdevice *s,
unsigned long new_size)
{
struct ni_private *devpriv = dev->private;
int ret;
ret = mite_buf_change(devpriv->ai_mite_ring, s);
if (ret < 0)
return ret;
return 0;
}
static int pcimio_ao_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,
unsigned long new_size)
{
struct ni_private *devpriv = dev->private;
int ret;
ret = mite_buf_change(devpriv->ao_mite_ring, s);
if (ret < 0)
return ret;
return 0;
}
static int pcimio_gpct0_change(struct comedi_device *dev, static int pcimio_gpct0_change(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_subdevice *s,
unsigned long new_size); unsigned long new_size)
{
struct ni_private *devpriv = dev->private;
int ret;
ret = mite_buf_change(devpriv->gpct_mite_ring[0], s);
if (ret < 0)
return ret;
return 0;
}
static int pcimio_gpct1_change(struct comedi_device *dev, static int pcimio_gpct1_change(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_subdevice *s,
unsigned long new_size); unsigned long new_size)
{
struct ni_private *devpriv = dev->private;
int ret;
ret = mite_buf_change(devpriv->gpct_mite_ring[1], s);
if (ret < 0)
return ret;
return 0;
}
static int pcimio_dio_change(struct comedi_device *dev, static int pcimio_dio_change(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_subdevice *s,
unsigned long new_size); unsigned long new_size)
{
struct ni_private *devpriv = dev->private;
int ret;
ret = mite_buf_change(devpriv->cdo_mite_ring, s);
if (ret < 0)
return ret;
return 0;
}
static void m_series_init_eeprom_buffer(struct comedi_device *dev) static void m_series_init_eeprom_buffer(struct comedi_device *dev)
{ {
...@@ -1230,73 +1287,6 @@ static int pcimio_auto_attach(struct comedi_device *dev, ...@@ -1230,73 +1287,6 @@ static int pcimio_auto_attach(struct comedi_device *dev,
return 0; return 0;
} }
static int pcimio_ai_change(struct comedi_device *dev,
struct comedi_subdevice *s, unsigned long new_size)
{
struct ni_private *devpriv = dev->private;
int ret;
ret = mite_buf_change(devpriv->ai_mite_ring, s);
if (ret < 0)
return ret;
return 0;
}
static int pcimio_ao_change(struct comedi_device *dev,
struct comedi_subdevice *s, unsigned long new_size)
{
struct ni_private *devpriv = dev->private;
int ret;
ret = mite_buf_change(devpriv->ao_mite_ring, s);
if (ret < 0)
return ret;
return 0;
}
static int pcimio_gpct0_change(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned long new_size)
{
struct ni_private *devpriv = dev->private;
int ret;
ret = mite_buf_change(devpriv->gpct_mite_ring[0], s);
if (ret < 0)
return ret;
return 0;
}
static int pcimio_gpct1_change(struct comedi_device *dev,
struct comedi_subdevice *s,
unsigned long new_size)
{
struct ni_private *devpriv = dev->private;
int ret;
ret = mite_buf_change(devpriv->gpct_mite_ring[1], s);
if (ret < 0)
return ret;
return 0;
}
static int pcimio_dio_change(struct comedi_device *dev,
struct comedi_subdevice *s, unsigned long new_size)
{
struct ni_private *devpriv = dev->private;
int ret;
ret = mite_buf_change(devpriv->cdo_mite_ring, s);
if (ret < 0)
return ret;
return 0;
}
static struct comedi_driver ni_pcimio_driver = { static struct comedi_driver ni_pcimio_driver = {
.driver_name = "ni_pcimio", .driver_name = "ni_pcimio",
.module = THIS_MODULE, .module = THIS_MODULE,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册