Commit 518bf39f authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: pcmmio: remove 'num_asic_chans' from subdevice private data

The 'num_asic_chans' that support interrupts in the interrupt subdevice is
always initialized to '24'. Remove this unneeded information from the subdevice
private data.
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 8fba3e5b
...@@ -209,11 +209,6 @@ struct pcmmio_subdev_private { ...@@ -209,11 +209,6 @@ struct pcmmio_subdev_private {
/* The below is only used for intr subdevices */ /* The below is only used for intr subdevices */
struct { struct {
/*
* the number of asic channels in this subdev
* that have interrutps
*/
int num_asic_chans;
/* /*
* subdev-relative channel mask for channels * subdev-relative channel mask for channels
* we are interested in * we are interested in
...@@ -448,9 +443,7 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d) ...@@ -448,9 +443,7 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d)
unsigned mytrig = unsigned mytrig =
((triggered >> 0) ((triggered >> 0)
& &
((0x1 << subpriv-> ((0x1 << 24) -
dio.intr.
num_asic_chans) -
1)) << 0; 1)) << 0;
if (mytrig & if (mytrig &
subpriv->dio. subpriv->dio.
...@@ -535,7 +528,7 @@ static int pcmmio_start_intr(struct comedi_device *dev, ...@@ -535,7 +528,7 @@ static int pcmmio_start_intr(struct comedi_device *dev,
subpriv->dio.intr.enabled_mask = 0; subpriv->dio.intr.enabled_mask = 0;
subpriv->dio.intr.active = 1; subpriv->dio.intr.active = 1;
nports = subpriv->dio.intr.num_asic_chans / CHANS_PER_PORT; nports = 24 / CHANS_PER_PORT;
firstport = 0 / CHANS_PER_PORT; firstport = 0 / CHANS_PER_PORT;
if (cmd->chanlist) { if (cmd->chanlist) {
for (n = 0; n < cmd->chanlist_len; n++) { for (n = 0; n < cmd->chanlist_len; n++) {
...@@ -546,7 +539,7 @@ static int pcmmio_start_intr(struct comedi_device *dev, ...@@ -546,7 +539,7 @@ static int pcmmio_start_intr(struct comedi_device *dev,
<< CR_CHAN(cmd->chanlist[n]); << CR_CHAN(cmd->chanlist[n]);
} }
} }
bits &= ((0x1 << subpriv->dio.intr.num_asic_chans) - 1) << 0; bits &= ((0x1 << 24) - 1) << 0;
subpriv->dio.intr.enabled_mask = bits; subpriv->dio.intr.enabled_mask = bits;
{ {
...@@ -956,7 +949,6 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -956,7 +949,6 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
subpriv = s->private; subpriv = s->private;
subpriv->dio.intr.active = 0; subpriv->dio.intr.active = 0;
subpriv->dio.intr.stop_count = 0; subpriv->dio.intr.stop_count = 0;
subpriv->dio.intr.num_asic_chans = 24;
spin_lock_init(&subpriv->dio.intr.spinlock); spin_lock_init(&subpriv->dio.intr.spinlock);
......
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