Move ni_8255_callback() to remove the need for the forward declaration. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/ni_mio_common.c | 28 ++++++++++++-------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index 7ffdcc0..ae941db 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -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 */ -- 1.9.2 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel