]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
staging: comedi: fix signess bug
authorVasiliy Kulikov <segooon@gmail.com>
Sun, 12 Sep 2010 18:56:35 +0000 (22:56 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 16 Sep 2010 19:37:34 +0000 (12:37 -0700)
ai_count and ao_counter are unsigned, check for < 0 doesn't make sense.
Cast them to int.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers/cb_pcidas64.c
drivers/staging/comedi/drivers/usbdux.c

index 9b1dd3cc2120628cd3dbba8cc429d5f91d5d380e..2583e16cd02a3a202e9800739f4175f538c429e3 100644 (file)
@@ -3078,7 +3078,7 @@ static void handle_ai_interrupt(struct comedi_device *dev,
                        spin_unlock_irqrestore(&dev->spinlock, flags);
        }
        /*  if we are have all the data, then quit */
-       if ((cmd->stop_src == TRIG_COUNT && priv(dev)->ai_count <= 0) ||
+       if ((cmd->stop_src == TRIG_COUNT && (int)priv(dev)->ai_count <= 0) ||
            (cmd->stop_src == TRIG_EXT && (status & ADC_STOP_BIT))) {
                async->events |= COMEDI_CB_EOA;
        }
index 4b320b1ff8237e068345d998fde8563190e4b937..6131e2dd0591ba60b38c6b7cc755e326e5382123 100644 (file)
@@ -649,7 +649,7 @@ static void usbduxsub_ao_IsocIrq(struct urb *urb)
 
        /* normal operation: executing a command in this subdevice */
        this_usbduxsub->ao_counter--;
-       if (this_usbduxsub->ao_counter <= 0) {
+       if ((int)this_usbduxsub->ao_counter <= 0) {
                /* timer zero */
                this_usbduxsub->ao_counter = this_usbduxsub->ao_timer;