]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: comedi: addi_apci_3120: remove private data 'b_ExttrigEnable'
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 4 Nov 2014 17:54:59 +0000 (10:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Nov 2014 17:34:03 +0000 (09:34 -0800)
This member of the private data is not really needed. The devpriv->ctrl
value can be checked to determine if the external trigger is enabled.
Remove the unnecessary member.

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/addi-data/hwdrv_apci3120.c
drivers/staging/comedi/drivers/addi_apci_3120.c

index 84600d4788c4ae04f344a7daab5604a8c0eecb7b..b38bbd31ac0a2faee911dd7db69b5381c1283919 100644 (file)
@@ -96,7 +96,6 @@ static int apci3120_reset(struct comedi_device *dev)
        /*  variables used in timer subdevice */
        devpriv->b_Timer2Mode = 0;
        devpriv->b_Timer2Interrupt = 0;
-       devpriv->b_ExttrigEnable = 0;   /*  Disable ext trigger */
 
        /* Disable all interrupts, watchdog for the anolog output */
        devpriv->mode = 0;
@@ -378,12 +377,8 @@ static int apci3120_ai_cmd(struct comedi_device *dev,
        /* load chanlist for command scan */
        apci3120_set_chanlist(dev, s, cmd->chanlist_len, cmd->chanlist);
 
-       if (cmd->start_src == TRIG_EXT) {
-               devpriv->b_ExttrigEnable = 1;
+       if (cmd->start_src == TRIG_EXT)
                apci3120_exttrig_enable(dev, true);
-       } else {
-               devpriv->b_ExttrigEnable = 0;
-       }
 
        if (cmd->scan_begin_src == TRIG_TIMER) {
                /*
@@ -591,10 +586,8 @@ static irqreturn_t apci3120_interrupt(int irq, void *d)
 
        outl(int_amcc | 0x00ff0000, devpriv->amcc + AMCC_OP_REG_INTCSR);
 
-       if (devpriv->b_ExttrigEnable) {
+       if (devpriv->ctrl & APCI3120_CTRL_EXT_TRIG)
                apci3120_exttrig_enable(dev, false);
-               devpriv->b_ExttrigEnable = 0;
-       }
 
        apci3120_clr_timer2_interrupt(dev);
 
index a6ae42fca6c04206498f8bcd7b6d2c499250201b..3900a90b9608a90666b9204699cf63f27d67bf20 100644 (file)
@@ -133,7 +133,6 @@ struct apci3120_private {
        unsigned short ctrl;
        unsigned char b_Timer2Mode;
        unsigned char b_Timer2Interrupt;
-       unsigned char b_ExttrigEnable;
        struct task_struct *tsk_Current;
 };