[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1447506803-11050-1-git-send-email-ranjithece24@gmail.com>
Date: Sat, 14 Nov 2015 18:43:23 +0530
From: Ranjith Thangavel <ranjithece24@...il.com>
To: gregkh@...uxfoundation.org
Cc: abbotti@....co.uk, hsweeten@...ionengravers.com,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
ranjithece24@...il.com
Subject: [PATCH] comedi: ni_6527: Fix coding style - use BIT macro
BIT macro is used for defining BIT location instead of
shifting operator - coding style issue
Signed-off-by: Ranjith Thangavel <ranjithece24@...il.com>
---
drivers/staging/comedi/drivers/ni_6527.c | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_6527.c b/drivers/staging/comedi/drivers/ni_6527.c
index b340b98..1903d64 100644
--- a/drivers/staging/comedi/drivers/ni_6527.c
+++ b/drivers/staging/comedi/drivers/ni_6527.c
@@ -32,6 +32,8 @@
#include "../comedi_pci.h"
+#include "comedi_fc.h"
+
/*
* PCI BAR1 - Register memory map
*
@@ -52,13 +54,13 @@
#define NI6527_FILT_ENA_REG(x) (0x0c + (x))
#define NI6527_STATUS_REG 0x14
#define NI6527_STATUS_IRQ BIT(2)
-#define NI6527_STATUS_OVERFLOW BIT(1)
+#define NI6527_STATUS_OVERFLOW BIT(1)
#define NI6527_STATUS_EDGE BIT(0)
#define NI6527_CTRL_REG 0x15
#define NI6527_CTRL_FALLING BIT(4)
#define NI6527_CTRL_RISING BIT(3)
#define NI6527_CTRL_IRQ BIT(2)
-#define NI6527_CTRL_OVERFLOW BIT(1)
+#define NI6527_CTRL_OVERFLOW BIT(1)
#define NI6527_CTRL_EDGE BIT(0)
#define NI6527_CTRL_DISABLE_IRQS 0
#define NI6527_CTRL_ENABLE_IRQS (NI6527_CTRL_FALLING | \
@@ -221,11 +223,11 @@ static int ni6527_intr_cmdtest(struct comedi_device *dev,
/* Step 1 : check if triggers are trivially valid */
- err |= comedi_check_trigger_src(&cmd->start_src, TRIG_NOW);
- err |= comedi_check_trigger_src(&cmd->scan_begin_src, TRIG_OTHER);
- err |= comedi_check_trigger_src(&cmd->convert_src, TRIG_FOLLOW);
- err |= comedi_check_trigger_src(&cmd->scan_end_src, TRIG_COUNT);
- err |= comedi_check_trigger_src(&cmd->stop_src, TRIG_COUNT);
+ err |= cfc_check_trigger_src(&cmd->start_src, TRIG_NOW);
+ err |= cfc_check_trigger_src(&cmd->scan_begin_src, TRIG_OTHER);
+ err |= cfc_check_trigger_src(&cmd->convert_src, TRIG_FOLLOW);
+ err |= cfc_check_trigger_src(&cmd->scan_end_src, TRIG_COUNT);
+ err |= cfc_check_trigger_src(&cmd->stop_src, TRIG_COUNT);
if (err)
return 1;
@@ -235,12 +237,11 @@ static int ni6527_intr_cmdtest(struct comedi_device *dev,
/* Step 3: check if arguments are trivially valid */
- err |= comedi_check_trigger_arg_is(&cmd->start_arg, 0);
- err |= comedi_check_trigger_arg_is(&cmd->scan_begin_arg, 0);
- err |= comedi_check_trigger_arg_is(&cmd->convert_arg, 0);
- err |= comedi_check_trigger_arg_is(&cmd->scan_end_arg,
- cmd->chanlist_len);
- err |= comedi_check_trigger_arg_is(&cmd->stop_arg, 0);
+ err |= cfc_check_trigger_arg_is(&cmd->start_arg, 0);
+ err |= cfc_check_trigger_arg_is(&cmd->scan_begin_arg, 0);
+ err |= cfc_check_trigger_arg_is(&cmd->convert_arg, 0);
+ err |= cfc_check_trigger_arg_is(&cmd->scan_end_arg, cmd->chanlist_len);
+ err |= cfc_check_trigger_arg_is(&cmd->stop_arg, 0);
if (err)
return 3;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists