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

staging: comedi: pcmmio: tidy up init_asics()

Rename this function so it has namespace associated with the driver.

The board supported by this driver only has one WinSystems WS16C48 asic
on it that handles the digital i/o. Remove the unnecessary for () loop
that would reset multiple asics.
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 8657fed8
......@@ -370,15 +370,11 @@ static void switch_page(struct comedi_device *dev, int page)
outb(page << REG_PAGE_BITOFFSET, devpriv->asic_iobase + REG_PAGELOCK);
}
static void init_asics(struct comedi_device *dev)
{ /* sets up an
ASIC chip to defaults */
static void pcmmio_reset(struct comedi_device *dev)
{
struct pcmmio_private *devpriv = dev->private;
int asic;
for (asic = 0; asic < 1; ++asic) {
int port, page;
unsigned long baseaddr = devpriv->asic_iobase;
int port, page;
switch_page(dev, 0); /* switch back to page 0 */
......@@ -398,7 +394,6 @@ static void init_asics(struct comedi_device *dev)
/* switch back to default page 0 */
switch_page(dev, 0);
}
}
static void pcmmio_stop_intr(struct comedi_device *dev,
......@@ -1073,7 +1068,7 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
}
init_asics(dev); /* clear out all the registers, basically */
pcmmio_reset(dev);
if (it->options[1]) {
ret = request_irq(it->options[1], interrupt_pcmmio, 0,
......
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