Skip to content

Commit

Permalink
staging: comedi: 8255: move the subdev_8255_io function
Browse files Browse the repository at this point in the history
The subdev_8255_interrupt function indirectly calls subdev_8255_io.
For aesthetic reasons, move the subdev_8255_io function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jun 14, 2012
1 parent 459f299 commit f9af899
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions drivers/staging/comedi/drivers/8255.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ struct subdev_8255_private {
int (*io) (int, int, int, unsigned long);
};

static int subdev_8255_io(int dir, int port, int data, unsigned long iobase)
{
if (dir) {
outb(data, iobase + port);
return 0;
} else {
return inb(iobase + port);
}
}

void subdev_8255_interrupt(struct comedi_device *dev,
struct comedi_subdevice *s)
{
Expand All @@ -119,16 +129,6 @@ void subdev_8255_interrupt(struct comedi_device *dev,
}
EXPORT_SYMBOL(subdev_8255_interrupt);

static int subdev_8255_io(int dir, int port, int data, unsigned long iobase)
{
if (dir) {
outb(data, iobase + port);
return 0;
} else {
return inb(iobase + port);
}
}

static int subdev_8255_insn(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
Expand Down

0 comments on commit f9af899

Please sign in to comment.