diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-06-18 13:22:42 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 15:51:02 -0700 |
commit | 43d70ce9ac772647baf8aadef1aa0f071bfe7f36 (patch) | |
tree | 42f0c233bebc66423054766b45b909e25413a6dd /drivers/staging/comedi | |
parent | dbe9c7929c6c0021414d61f85fe4e2f20f069e1c (diff) | |
download | linux-43d70ce9ac772647baf8aadef1aa0f071bfe7f36.tar.gz linux-43d70ce9ac772647baf8aadef1aa0f071bfe7f36.tar.bz2 linux-43d70ce9ac772647baf8aadef1aa0f071bfe7f36.zip |
staging: comedi: pcmuio: remove 'asic_chan'
This member of the subdevice private data is always initialize to
'0' due to the 'thisasic_chanct' always being zero when it is set
during the attach. Simplify the driver a bit by removing it.
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 | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio.c index e5758814e161..b348e2c3d3e5 100644 --- a/drivers/staging/comedi/drivers/pcmuio.c +++ b/drivers/staging/comedi/drivers/pcmuio.c @@ -153,11 +153,6 @@ struct pcmuio_subdev_private { /* if non-negative, this subdev has an interrupt asic */ int asic; /* - * if nonnegative, the first channel id with - * respect to the asic that has interrupts - */ - int asic_chan; - /* * subdev-relative channel mask for channels * we are interested in */ @@ -368,7 +363,7 @@ static void pcmuio_handle_intr_subdev(struct comedi_device *dev, if (!subpriv->intr.active) goto done; - mytrig = triggered >> subpriv->intr.asic_chan; + mytrig = triggered; mytrig &= ((0x1 << s->n_chan) - 1); if (!(mytrig & subpriv->intr.enabled_mask)) @@ -718,7 +713,6 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->insn_config = pcmuio_dio_insn_config; s->n_chan = min(chans_left, MAX_CHANS_PER_SUBDEV); subpriv->intr.asic = -1; - subpriv->intr.asic_chan = -1; subpriv->intr.active = 0; s->len_chanlist = 1; @@ -741,7 +735,6 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it) subpriv->intr.asic = asic; subpriv->intr.active = 0; subpriv->intr.stop_count = 0; - subpriv->intr.asic_chan = thisasic_chanct; dev->read_subdev = s; s->subdev_flags |= SDF_CMD_READ; s->cancel = pcmuio_cancel; |