mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] staging: comedi: make ni_tio_has_gate2_registers return boolean
@ 2015-10-18 14:35 Geliang Tang
  2015-10-18 14:35 ` [PATCH 2/3] staging: lustre: make sptlrpc_flavor_has_bulk " Geliang Tang
  2015-10-21 16:44 ` [PATCH 1/3] staging: comedi: make ni_tio_has_gate2_registers " Ian Abbott
  0 siblings, 2 replies; 4+ messages in thread
From: Geliang Tang @ 2015-10-18 14:35 UTC (permalink / raw)
  To: Ian Abbott, H Hartley Sweeten, Greg Kroah-Hartman
  Cc: Geliang Tang, devel, linux-kernel

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>
---
 drivers/staging/comedi/drivers/ni_tio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c
index c20c51b..b74e44e 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;
 	}
 }
 
-- 
2.5.0



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-21 16:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-18 14:35 [PATCH 1/3] staging: comedi: make ni_tio_has_gate2_registers return boolean Geliang Tang
2015-10-18 14:35 ` [PATCH 2/3] staging: lustre: make sptlrpc_flavor_has_bulk " Geliang Tang
2015-10-18 14:35   ` [PATCH 3/3] staging: xgifb: make XGIfb_has_VB " Geliang Tang
2015-10-21 16:44 ` [PATCH 1/3] staging: comedi: make ni_tio_has_gate2_registers " Ian Abbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®