From: "Andrew F. Davis" <afd@ti.com>
To: Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: <linux-iio@vger.kernel.org>, "Andrew F . Davis" <afd@ti.com>
Subject: [PATCH] iio: dac: mcp4725: Remove unneeded conversions to bool
Date: Tue, 5 Dec 2017 13:12:01 -0600 [thread overview]
Message-ID: <20171205191201.21572-1-afd@ti.com> (raw)
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 afa856d10c26..8b5aad4c32d9 100644
--- a/drivers/iio/dac/mcp4725.c
+++ b/drivers/iio/dac/mcp4725.c
@@ -476,7 +476,7 @@ static int mcp4725_probe(struct i2c_client *client,
goto err_disable_vref_reg;
}
pd = (inbuf[0] >> 1) & 0x3;
- data->powerdown = pd > 0 ? true : false;
+ data->powerdown = pd > 0;
data->powerdown_mode = pd ? pd - 1 : 2; /* largest resistor to gnd */
data->dac_value = (inbuf[1] << 4) | (inbuf[2] >> 4);
if (data->id == MCP4726)
--
2.15.0
next reply other threads:[~2017-12-05 19:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-05 19:12 Andrew F. Davis [this message]
2017-12-10 18:32 ` [PATCH] iio: dac: mcp4725: Remove unneeded conversions to bool Jonathan Cameron
-- strict thread matches above, loose matches on Subject: below --
2016-07-01 14:33 Andrew F. Davis
2016-07-01 15:03 ` Peter Meerwald-Stadler
2016-07-01 15:18 ` Andrew F. Davis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171205191201.21572-1-afd@ti.com \
--to=afd@ti.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).