staging: comedi: make ni_tio_has_gate2_registers return boolean
authorGeliang Tang <geliangtang@163.com>
Sun, 18 Oct 2015 14:35:30 +0000 (22:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 02:14:25 +0000 (19:14 -0700)
This patch makes ni_tio_has_gate2_registers return boolean, since
this function only uses either one or zero as its return value.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_tio.c

index c20c51bef3e7d543f39fffc9e53060742291cfe2..b74e44ec521a494887b79bb6bb16f10c99558c5f 100644 (file)
@@ -167,15 +167,15 @@ static inline unsigned GI_HW_ARM_SEL_MASK(enum ni_gpct_variant variant)
        }
 }
 
-static int ni_tio_has_gate2_registers(const struct ni_gpct_device *counter_dev)
+static bool ni_tio_has_gate2_registers(const struct ni_gpct_device *counter_dev)
 {
        switch (counter_dev->variant) {
        case ni_gpct_variant_e_series:
        default:
-               return 0;
+               return false;
        case ni_gpct_variant_m_series:
        case ni_gpct_variant_660x:
-               return 1;
+               return true;
        }
 }