lkml.org 
[lkml]   [2016]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] iio: dac: mcp4725: Remove unneeded conversions to bool
Date
Found with scripts/coccinelle/misc/boolconv.cocci.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
drivers/iio/dac/mcp4725.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/dac/mcp4725.c b/drivers/iio/dac/mcp4725.c
index cca935c..c3bb3fd 100644
--- a/drivers/iio/dac/mcp4725.c
+++ b/drivers/iio/dac/mcp4725.c
@@ -361,7 +361,7 @@ static int mcp4725_probe(struct i2c_client *client,
return err;
}
pd = (inbuf[0] >> 1) & 0x3;
- data->powerdown = pd > 0 ? true : false;
+ data->powerdown = pd > 0;
data->powerdown_mode = pd ? pd - 1 : 2; /* largest register to gnd */
data->dac_value = (inbuf[1] << 4) | (inbuf[2] >> 4);

--
2.9.0
\
 
 \ /
  Last update: 2016-07-01 17:21    [W:0.050 / U:2.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site