summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/adl_pci9118.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-09-09 13:05:44 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-11 14:34:25 -0700
commit7d62b548ded7a5540ecd89fb38d0dab876aec78f (patch)
treef088a77301bc21e0956d0470cfcc12413abb149e /drivers/staging/comedi/drivers/adl_pci9118.c
parentacdc21c2030659de8d9a9d3960b3b004a38eeec7 (diff)
staging: comedi: adl_pci9118: rename setup_channel_list()
Rename this function so it has namespace associated with the driver. Also, this function always succeeds. Change the return type to void and remove the unnecessary error handling by the callers. 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/drivers/adl_pci9118.c')
-rw-r--r--drivers/staging/comedi/drivers/adl_pci9118.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c
index 67f8ff14efa8..89a6ea578968 100644
--- a/drivers/staging/comedi/drivers/adl_pci9118.c
+++ b/drivers/staging/comedi/drivers/adl_pci9118.c
@@ -385,10 +385,10 @@ static int check_channel_list(struct comedi_device *dev,
return 1;
}
-static int setup_channel_list(struct comedi_device *dev,
- struct comedi_subdevice *s, int n_chan,
- unsigned int *chanlist, int frontadd,
- int backadd)
+static void pci9118_set_chanlist(struct comedi_device *dev,
+ struct comedi_subdevice *s,
+ int n_chan, unsigned int *chanlist,
+ int frontadd, int backadd)
{
struct pci9118_private *devpriv = dev->private;
unsigned int scanquad, gain, ssh = 0x00;
@@ -434,8 +434,6 @@ static int setup_channel_list(struct comedi_device *dev,
/* close scan queue */
outl(0, dev->iobase + PCI9118_AI_AUTOSCAN_MODE_REG);
/* udelay(100); important delay, or first sample will be crippled */
-
- return 1; /* we can serve this with scan logic */
}
static void interrupt_pci9118_ai_mode4_switch(struct comedi_device *dev,
@@ -1337,10 +1335,8 @@ static int pci9118_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
*/
pci9118_ai_set_range_aref(dev, s, cmd->chanlist[0]);
- if (!setup_channel_list(dev, s, cmd->chanlist_len,
- cmd->chanlist, devpriv->ai_add_front,
- devpriv->ai_add_back))
- return -EINVAL;
+ pci9118_set_chanlist(dev, s, cmd->chanlist_len, cmd->chanlist,
+ devpriv->ai_add_front, devpriv->ai_add_back);
/* compute timers settings */
/*
@@ -1453,8 +1449,7 @@ static int pci9118_ai_insn_read(struct comedi_device *dev,
devpriv->ai_cfg = PCI9118_AI_CFG_PDTRG | PCI9118_AI_CFG_PETRG;
outl(devpriv->ai_cfg, dev->iobase + PCI9118_AI_CFG_REG);
- if (!setup_channel_list(dev, s, 1, &insn->chanspec, 0, 0))
- return -EINVAL;
+ pci9118_set_chanlist(dev, s, 1, &insn->chanspec, 0, 0);
pci9118_ai_reset_fifo(dev);