[PATCH 3/3] staging: comedi: addi_apci_1564: board has 3 timers

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

 



According to ADDI-DATA, the APCI-1564 only has 3 timers. There are some
customer specific boards with 4 timers but they use out of tree drivers.

Now that the timer 'channels' are handled correctly in the subdevice
functions, fix the number of timer channels for the subdevice and remove
the code that would access a 4th timer.

Also, remove the unnecessary initialzation of the subdevice 'len_chanlist'.
That member is only used by subdevices that support async commands.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c | 2 --
 drivers/staging/comedi/drivers/addi_apci_1564.c           | 4 +---
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
index fece17f..ad9949c 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
@@ -99,8 +99,6 @@ static int apci1564_timer_config(struct comedi_device *dev,
 			    APCI1564_COUNTER_IRQ_REG(1));
 			outl(0x0, dev->iobase +
 			    APCI1564_COUNTER_IRQ_REG(2));
-			outl(0x0, dev->iobase +
-			    APCI1564_COUNTER_IRQ_REG(3));
 		} else {
 			/* disable Timer interrupt */
 			outl(0x0, devpriv->amcc_iobase + APCI1564_TIMER_CTRL_REG);
diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c
index 9d05194..c328230 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1564.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1564.c
@@ -67,7 +67,6 @@ static int apci1564_reset(struct comedi_device *dev)
 	outl(0x0, dev->iobase + APCI1564_COUNTER_CTRL_REG(0));
 	outl(0x0, dev->iobase + APCI1564_COUNTER_CTRL_REG(1));
 	outl(0x0, dev->iobase + APCI1564_COUNTER_CTRL_REG(2));
-	outl(0x0, dev->iobase + APCI1564_COUNTER_CTRL_REG(3));
 
 	return 0;
 }
@@ -433,9 +432,8 @@ static int apci1564_auto_attach(struct comedi_device *dev,
 	s = &dev->subdevices[3];
 	s->type		= COMEDI_SUBD_TIMER;
 	s->subdev_flags	= SDF_WRITEABLE;
-	s->n_chan	= 1;
+	s->n_chan	= 3;
 	s->maxdata	= 0;
-	s->len_chanlist	= 1;
 	s->range_table	= &range_digital;
 	s->insn_write	= apci1564_timer_write;
 	s->insn_read	= apci1564_timer_read;
-- 
2.0.3

_______________________________________________
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