summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2013-10-08 18:06:35 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-11 22:34:21 (GMT)
commitc3e3a56d40c451271b1be4d6d3ec3b62af879228 (patch)
treea21f011365d49c2ecc621384aea1ad6e16a0f126
parent3f1f219ce1f814976a3e435b4e6fa963252d7581 (diff)
downloadlinux-c3e3a56d40c451271b1be4d6d3ec3b62af879228.tar.xz
staging: comedi: s626: remove TRUE and FALSE macros
"s626.h" defines the macros `TRUE` and `FALSE` if they are not already defined, yielding the expected numeric values. Remove the macros and replace their usage with the values `true` and `false`, respectively. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/s626.c18
-rw-r--r--drivers/staging/comedi/drivers/s626.h8
2 files changed, 9 insertions, 17 deletions
diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
index 9216e9a..733e62b 100644
--- a/drivers/staging/comedi/drivers/s626.c
+++ b/drivers/staging/comedi/drivers/s626.c
@@ -1098,7 +1098,7 @@ static void set_clk_mult(struct comedi_device *dev,
const struct s626_enc_info *k, uint16_t value)
{
k->set_mode(dev, k, ((k->get_mode(dev, k) & ~STDMSK_CLKMULT) |
- (value << STDBIT_CLKMULT)), FALSE);
+ (value << STDBIT_CLKMULT)), false);
}
static uint16_t get_clk_mult(struct comedi_device *dev,
@@ -1114,7 +1114,7 @@ static void set_clk_pol(struct comedi_device *dev,
const struct s626_enc_info *k, uint16_t value)
{
k->set_mode(dev, k, ((k->get_mode(dev, k) & ~STDMSK_CLKPOL) |
- (value << STDBIT_CLKPOL)), FALSE);
+ (value << STDBIT_CLKPOL)), false);
}
static uint16_t get_clk_pol(struct comedi_device *dev,
@@ -1130,7 +1130,7 @@ static void set_clk_src(struct comedi_device *dev,
const struct s626_enc_info *k, uint16_t value)
{
k->set_mode(dev, k, ((k->get_mode(dev, k) & ~STDMSK_CLKSRC) |
- (value << STDBIT_CLKSRC)), FALSE);
+ (value << STDBIT_CLKSRC)), false);
}
static uint16_t get_clk_src(struct comedi_device *dev,
@@ -1146,7 +1146,7 @@ static void set_index_pol(struct comedi_device *dev,
const struct s626_enc_info *k, uint16_t value)
{
k->set_mode(dev, k, ((k->get_mode(dev, k) & ~STDMSK_INDXPOL) |
- ((value != 0) << STDBIT_INDXPOL)), FALSE);
+ ((value != 0) << STDBIT_INDXPOL)), false);
}
static uint16_t get_index_pol(struct comedi_device *dev,
@@ -1162,7 +1162,7 @@ static void set_index_src(struct comedi_device *dev,
const struct s626_enc_info *k, uint16_t value)
{
k->set_mode(dev, k, ((k->get_mode(dev, k) & ~STDMSK_INDXSRC) |
- ((value != 0) << STDBIT_INDXSRC)), FALSE);
+ ((value != 0) << STDBIT_INDXSRC)), false);
}
static uint16_t get_index_src(struct comedi_device *dev,
@@ -2000,7 +2000,7 @@ static void s626_timer_load(struct comedi_device *dev,
uint16_t value_latchsrc = LATCHSRC_A_INDXA;
/* uint16_t enab = CLKENAB_ALWAYS; */
- k->set_mode(dev, k, setup, FALSE);
+ k->set_mode(dev, k, setup, false);
/* Set the preload register */
preload(dev, k, tick);
@@ -2382,7 +2382,7 @@ static int s626_enc_insn_config(struct comedi_device *dev,
(CLKPOL_POS << BF_CLKPOL) | /* Active high clock. */
(CLKMULT_1X << BF_CLKMULT) | /* Clock multiplier is 1x. */
(CLKENAB_INDEX << BF_CLKENAB);
- /* uint16_t disable_int_src = TRUE; */
+ /* uint16_t disable_int_src = true; */
/* uint32_t Preloadvalue; //Counter initial value */
uint16_t value_latchsrc = LATCHSRC_AB_READ;
uint16_t enab = CLKENAB_ALWAYS;
@@ -2391,7 +2391,7 @@ static int s626_enc_insn_config(struct comedi_device *dev,
/* (data==NULL) ? (Preloadvalue=0) : (Preloadvalue=data[0]); */
- k->set_mode(dev, k, setup, TRUE);
+ k->set_mode(dev, k, setup, true);
preload(dev, k, data[0]);
k->pulse_index(dev, k);
set_latch_source(dev, k, value_latchsrc);
@@ -2480,7 +2480,7 @@ static void counters_init(struct comedi_device *dev)
*/
for (chan = 0; chan < S626_ENCODER_CHANNELS; chan++) {
k = &s626_enc_chan_info[chan];
- k->set_mode(dev, k, setup, TRUE);
+ k->set_mode(dev, k, setup, true);
k->set_int_src(dev, k, 0);
k->reset_cap_flags(dev, k);
k->set_enable(dev, k, CLKENAB_ALWAYS);
diff --git a/drivers/staging/comedi/drivers/s626.h b/drivers/staging/comedi/drivers/s626.h
index db16b18..2d332bf 100644
--- a/drivers/staging/comedi/drivers/s626.h
+++ b/drivers/staging/comedi/drivers/s626.h
@@ -22,14 +22,6 @@
#ifndef S626_H_INCLUDED
#define S626_H_INCLUDED
-#if !defined(TRUE)
-#define TRUE (1)
-#endif
-
-#if !defined(FALSE)
-#define FALSE (0)
-#endif
-
#define S626_SIZE 0x200
#define DMABUF_SIZE 4096 /* 4k pages */