summaryrefslogtreecommitdiff
path: root/linux-core/nv50_i2c.c
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2008-07-03 09:08:01 +0200
committerMaarten Maathuis <madman2003@gmail.com>2008-07-03 09:08:01 +0200
commit062d85062061199f2326982e27d54955a4ad76dc (patch)
tree5ae6363ec05d17644ee005a97950eb64aebfd8b9 /linux-core/nv50_i2c.c
parentd5ca5c9cd379438ac303598677f3789adc3687b1 (diff)
nv50: s/FALSE/false && s/TRUE/true
Diffstat (limited to 'linux-core/nv50_i2c.c')
-rw-r--r--linux-core/nv50_i2c.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/linux-core/nv50_i2c.c b/linux-core/nv50_i2c.c
index e90a4cee..30e317c5 100644
--- a/linux-core/nv50_i2c.c
+++ b/linux-core/nv50_i2c.c
@@ -106,19 +106,19 @@ static bool nv50_i2c_raise_clock(struct nv50_i2c_channel *chan, int data)
for (i = 2200; i > 0; i -= 2) {
nv50_i2c_get_bits(chan, &clock, &data);
if (clock)
- return TRUE;
+ return true;
udelay(2);
}
printk("a timeout occured in nv50_i2c_raise_clock\n");
- return FALSE;
+ return false;
}
static bool nv50_i2c_start(struct nv50_i2c_channel *chan)
{
if (!nv50_i2c_raise_clock(chan, 1))
- return FALSE;
+ return false;
nv50_i2c_set_bits(chan, 1, 0);
udelay(5);
@@ -126,7 +126,7 @@ static bool nv50_i2c_start(struct nv50_i2c_channel *chan)
nv50_i2c_set_bits(chan, 0, 0);
udelay(5);
- return TRUE;
+ return true;
}
static void nv50_i2c_stop(struct nv50_i2c_channel *chan)
@@ -181,7 +181,7 @@ static bool nv50_i2c_write_byte(struct nv50_i2c_channel *chan, uint8_t byte)
for (i = 7; i >= 0; i--)
if (!nv50_i2c_write_bit(chan, (byte >> i) & 1))
- return FALSE;
+ return false;
nv50_i2c_set_bits(chan, 0, 1);
udelay(5);
@@ -198,7 +198,7 @@ static bool nv50_i2c_write_byte(struct nv50_i2c_channel *chan, uint8_t byte)
if (i <= 0) {
printk("a timeout occured in nv50_i2c_write_byte\n");
- rval = FALSE;
+ rval = false;
}
}
@@ -222,14 +222,14 @@ static bool nv50_i2c_read_byte(struct nv50_i2c_channel *chan, uint8_t *byte, boo
if (bit)
*byte |= (1 << i);
} else {
- return FALSE;
+ return false;
}
}
if (!nv50_i2c_write_bit(chan, last ? 1 : 0))
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
/* only 7 bits addresses. */
@@ -241,13 +241,13 @@ static bool nv50_i2c_address(struct nv50_i2c_channel *chan, uint8_t address, boo
real_addr |= 1;
if (nv50_i2c_write_byte(chan, real_addr))
- return TRUE;
+ return true;
/* failure, so issue stop */
nv50_i2c_stop(chan);
}
- return FALSE;
+ return false;
}
static bool nv50_i2c_read(struct nv50_i2c_channel *chan, uint8_t address, uint8_t *buffer, uint32_t length)
@@ -257,9 +257,9 @@ static bool nv50_i2c_read(struct nv50_i2c_channel *chan, uint8_t address, uint8_
/* retries */
for (i = 0; i < 4; i++) {
- rval = nv50_i2c_address(chan, address, FALSE);
+ rval = nv50_i2c_address(chan, address, false);
if (!rval)
- return FALSE;
+ return false;
for (j = 0; j < length; j++) {
last = false;
@@ -292,9 +292,9 @@ static bool nv50_i2c_write(struct nv50_i2c_channel *chan, uint8_t address, uint8
/* retries */
for (i = 0; i < 4; i++) {
- rval = nv50_i2c_address(chan, address, TRUE);
+ rval = nv50_i2c_address(chan, address, true);
if (!rval)
- return FALSE;
+ return false;
for (j = 0; j < length; j++) {
rval = nv50_i2c_write_byte(chan, buffer[j]);