From: Geliang Tang Date: Sun, 18 Oct 2015 14:35:30 +0000 (+0800) Subject: staging: comedi: make ni_tio_has_gate2_registers return boolean X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=abfe2196e03d7026776a0bfb94f93ae1227b23d0;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: make ni_tio_has_gate2_registers return boolean 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c index c20c51bef3e7..b74e44ec521a 100644 --- a/drivers/staging/comedi/drivers/ni_tio.c +++ b/drivers/staging/comedi/drivers/ni_tio.c @@ -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; } }