From: H Hartley Sweeten Date: Wed, 28 May 2014 23:26:24 +0000 (-0700) Subject: staging: comedi: ni_mio_common: remove forward declaration 1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f5985867ff22e8dd572b9d361cc714abe10bc46c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index 7ffdcc07ef92..ae941db6cb72 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 */