]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: comedi: ni_65xx: filter interval register is 32-bit
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 14 Jul 2014 19:06:51 +0000 (12:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jul 2014 20:22:49 +0000 (13:22 -0700)
According to the register programming manual, the filter interval
register is 32-bit. Fix the writes to this register.

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>
drivers/staging/comedi/drivers/ni_65xx.c

index d6c11405ebc0678b815852300776d69d64201ace..292355b24994e881ff5d03198bf34940bdccffd1 100644 (file)
@@ -299,7 +299,7 @@ static int ni_65xx_config_filter(struct comedi_device *dev,
                data[1] = interval * filter_resolution_ns;
 
                if (interval != devpriv->filter_interval) {
-                       writeb(interval, devpriv->mmio + Filter_Interval);
+                       writel(interval, devpriv->mmio + Filter_Interval);
                        devpriv->filter_interval = interval;
                }
 
@@ -689,7 +689,7 @@ static int ni_65xx_auto_attach(struct comedi_device *dev,
        writeb(0x00, devpriv->mmio + Master_Interrupt_Control);
 
        /* Set filter interval to 0  (32bit reg) */
-       writeb(0x00000000, devpriv->mmio + Filter_Interval);
+       writel(0x00000000, devpriv->mmio + Filter_Interval);
 
        ret = request_irq(dev->irq, ni_65xx_interrupt, IRQF_SHARED,
                          "ni_65xx", dev);