[PATCH 33/48] staging: comedi: pcmmio: remove 'num_asic_chans' from subdevice private data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/pcmmio.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c
index 0a6eb50..8e00d12 100644
--- a/drivers/staging/comedi/drivers/pcmmio.c
+++ b/drivers/staging/comedi/drivers/pcmmio.c
@@ -210,11 +210,6 @@ struct pcmmio_subdev_private {
 			/* The below is only used for intr subdevices */
 			struct {
 				/*
-				 * the number of asic channels in this subdev
-				 * that have interrutps
-				 */
-				int num_asic_chans;
-				/*
 				 * subdev-relative channel mask for channels
 				 * we are interested in
 				 */
@@ -448,9 +443,7 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d)
 							unsigned mytrig =
 							    ((triggered >> 0)
 							     &
-							     ((0x1 << subpriv->
-							       dio.intr.
-							       num_asic_chans) -
+							     ((0x1 << 24) -
 							      1)) << 0;
 							if (mytrig &
 							    subpriv->dio.
@@ -535,7 +528,7 @@ static int pcmmio_start_intr(struct comedi_device *dev,
 
 		subpriv->dio.intr.enabled_mask = 0;
 		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;
 		if (cmd->chanlist) {
 			for (n = 0; n < cmd->chanlist_len; n++) {
@@ -546,7 +539,7 @@ static int pcmmio_start_intr(struct comedi_device *dev,
 				    << 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;
 
 		{
@@ -956,7 +949,6 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	subpriv = s->private;
 	subpriv->dio.intr.active = 0;
 	subpriv->dio.intr.stop_count = 0;
-	subpriv->dio.intr.num_asic_chans = 24;
 
 	spin_lock_init(&subpriv->dio.intr.spinlock);
 
-- 
1.8.4.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux