diff options
| author | 2013-12-09 15:30:54 -0700 | |
|---|---|---|
| committer | 2013-12-17 10:02:12 -0800 | |
| commit | 8657fed873905aaf4267e96c8381ece77927caf0 (patch) | |
| tree | 45cdc03d955e8cd677fdd899cd3830d805e4c0cd | |
| parent | staging: comedi: pcmmio: there is only one asic (diff) | |
staging: comedi: pcmmio: remove 'asic' parameter from switch_page()
The board supported by this driver only has one WinSystems WS16C48 asic
on it that handles the digital i/o.
Remove the unnecessary 'asic' parameter that is passed to switch_page().
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>
| -rw-r--r-- | drivers/staging/comedi/drivers/pcmmio.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c index 25b37f10f1cf..3e3f4c9b8877 100644 --- a/drivers/staging/comedi/drivers/pcmmio.c +++ b/drivers/staging/comedi/drivers/pcmmio.c @@ -363,7 +363,7 @@ static int pcmmio_dio_insn_config(struct comedi_device *dev, return insn->n; } -static void switch_page(struct comedi_device *dev, int asic, int page) +static void switch_page(struct comedi_device *dev, int page) { struct pcmmio_private *devpriv = dev->private; @@ -380,7 +380,7 @@ static void init_asics(struct comedi_device *dev) int port, page; unsigned long baseaddr = devpriv->asic_iobase; - switch_page(dev, asic, 0); /* switch back to page 0 */ + switch_page(dev, 0); /* switch back to page 0 */ /* first, clear all the DIO port bits */ for (port = 0; port < PORTS_PER_ASIC; ++port) @@ -390,14 +390,14 @@ static void init_asics(struct comedi_device *dev) for (page = 1; page < NUM_PAGES; ++page) { int reg; /* now clear all the paged registers */ - switch_page(dev, asic, page); + switch_page(dev, page); for (reg = FIRST_PAGED_REG; reg < FIRST_PAGED_REG + NUM_PAGED_REGS; ++reg) outb(0, baseaddr + reg); } /* switch back to default page 0 */ - switch_page(dev, asic, 0); + switch_page(dev, 0); } } @@ -416,7 +416,7 @@ static void pcmmio_stop_intr(struct comedi_device *dev, s->async->inttrig = NULL; nports = subpriv->dio.intr.num_asic_chans / CHANS_PER_PORT; firstport = subpriv->dio.intr.asic_chan / CHANS_PER_PORT; - switch_page(dev, asic, PAGE_ENAB); + switch_page(dev, PAGE_ENAB); for (port = firstport; port < firstport + nports; ++port) { /* disable all intrs for this subdev.. */ outb(0, devpriv->asic_iobase + REG_ENAB0 + port); @@ -449,8 +449,7 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d) if (int_pend & (0x1 << port)) { unsigned char io_lines_with_edges = 0; - switch_page(dev, asic, - PAGE_INT_ID); + switch_page(dev, PAGE_INT_ID); io_lines_with_edges = inb(iobase + REG_INT_ID0 + port); @@ -634,7 +633,7 @@ static int pcmmio_start_intr(struct comedi_device *dev, /* done, we told the board what irq to use */ } - switch_page(dev, asic, PAGE_ENAB); + switch_page(dev, PAGE_ENAB); for (port = firstport; port < firstport + nports; ++port) { unsigned enab = bits >> (subpriv->dio.intr.first_chan + (port - @@ -644,7 +643,7 @@ static int pcmmio_start_intr(struct comedi_device *dev, (port - firstport) * 8) & 0xff; /* set enab intrs for this subdev.. */ outb(enab, devpriv->asic_iobase + REG_ENAB0 + port); - switch_page(dev, asic, PAGE_POL); + switch_page(dev, PAGE_POL); outb(pol, devpriv->asic_iobase + REG_ENAB0 + port); } } |
