Commit f5985867 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: ni_mio_common: remove forward declaration 1

Move ni_8255_callback() to remove the need for the forward declaration.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 806c4879
...@@ -271,8 +271,6 @@ static void shutdown_ai_command(struct comedi_device *dev); ...@@ -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, static int ni_ao_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned int trignum); unsigned int trignum);
static int ni_8255_callback(int dir, int port, int data, unsigned long arg);
#ifdef PCIDMA #ifdef PCIDMA
static int ni_gpct_cmd(struct comedi_device *dev, struct comedi_subdevice *s); 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); 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) ...@@ -4159,6 +4157,19 @@ static int ni_alloc_private(struct comedi_device *dev)
return 0; 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) static int ni_E_init(struct comedi_device *dev)
{ {
const struct ni_board_struct *board = comedi_board(dev); const struct ni_board_struct *board = comedi_board(dev);
...@@ -4489,19 +4500,6 @@ static int ni_E_init(struct comedi_device *dev) ...@@ -4489,19 +4500,6 @@ static int ni_E_init(struct comedi_device *dev)
return 0; 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 presents the EEPROM as a subdevice
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment