staging: comedi: ni_mio_common: remove forward declaration 1

Move ni_8255_callback() to remove the need for the forward declaration.

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>
This commit is contained in:
H Hartley Sweeten 2014-05-28 16:26:24 -07:00 committed by Greg Kroah-Hartman
parent 806c4879e0
commit f5985867ff
1 changed files with 13 additions and 15 deletions

View File

@ -271,8 +271,6 @@ static void shutdown_ai_command(struct comedi_device *dev);
static int ni_ao_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned int trignum);
static int ni_8255_callback(int dir, int port, int data, unsigned long arg);
#ifdef PCIDMA
static int ni_gpct_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
static int ni_gpct_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
@ -4159,6 +4157,19 @@ static int ni_alloc_private(struct comedi_device *dev)
return 0;
};
static int ni_8255_callback(int dir, int port, int data, unsigned long arg)
{
struct comedi_device *dev = (struct comedi_device *)arg;
struct ni_private *devpriv __maybe_unused = dev->private;
if (dir) {
ni_writeb(data, Port_A + 2 * port);
return 0;
} else {
return ni_readb(Port_A + 2 * port);
}
}
static int ni_E_init(struct comedi_device *dev)
{
const struct ni_board_struct *board = comedi_board(dev);
@ -4489,19 +4500,6 @@ static int ni_E_init(struct comedi_device *dev)
return 0;
}
static int ni_8255_callback(int dir, int port, int data, unsigned long arg)
{
struct comedi_device *dev = (struct comedi_device *)arg;
struct ni_private *devpriv __maybe_unused = dev->private;
if (dir) {
ni_writeb(data, Port_A + 2 * port);
return 0;
} else {
return ni_readb(Port_A + 2 * port);
}
}
/*
presents the EEPROM as a subdevice
*/