diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-06-18 13:21:13 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 15:50:38 -0700 |
commit | 46317da71ee85dccc351735e8b463123f4d448a3 (patch) | |
tree | 17403fd9ddd6c190b17a19178517efe595a02080 /drivers/staging/comedi | |
parent | f45a1f26eae4cadbfeb65b4b36bfa3583f694066 (diff) | |
download | linux-46317da71ee85dccc351735e8b463123f4d448a3.tar.gz linux-46317da71ee85dccc351735e8b463123f4d448a3.tar.bz2 linux-46317da71ee85dccc351735e8b463123f4d448a3.zip |
staging: comedi: pcmuio: tidy up switch_page()
All the I/O ports are left unlocked in the driver so the 'pagelock'
in the private data is not necessary. The paranoia sanity checks
are also unnecessary, Remove them.
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>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/pcmuio.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio.c index 9fb75a47fb77..3c98a00998b0 100644 --- a/drivers/staging/comedi/drivers/pcmuio.c +++ b/drivers/staging/comedi/drivers/pcmuio.c @@ -182,8 +182,6 @@ struct pcmuio_subdev_private { struct pcmuio_private { struct { - /* current page and lock */ - unsigned char pagelock; /* shadow of POLx registers */ unsigned char pol[NUM_PAGED_REGS]; /* shadow of ENABx registers */ @@ -312,19 +310,7 @@ static int pcmuio_dio_insn_config(struct comedi_device *dev, static void switch_page(struct comedi_device *dev, int asic, int page) { - const struct pcmuio_board *board = comedi_board(dev); - struct pcmuio_private *devpriv = dev->private; - - if (asic < 0 || asic >= board->num_asics) - return; /* paranoia */ - if (page < 0 || page >= NUM_PAGES) - return; /* more paranoia */ - - devpriv->asics[asic].pagelock &= ~PCMUIO_PAGE_MASK; - devpriv->asics[asic].pagelock |= PCMUIO_PAGE(page); - - /* now write out the shadow register */ - outb(devpriv->asics[asic].pagelock, + outb(PCMUIO_PAGE(page), dev->iobase + ASIC_IOSIZE * asic + PCMUIO_PAGE_LOCK_REG); } |