Commit f272f19c authored by Andrew F. Davis's avatar Andrew F. Davis Committed by Greg Kroah-Hartman

iio: dac: mcp4725: Remove unneeded conversions to bool

Found with scripts/coccinelle/misc/boolconv.cocci.
Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e93e261
...@@ -476,7 +476,7 @@ static int mcp4725_probe(struct i2c_client *client, ...@@ -476,7 +476,7 @@ static int mcp4725_probe(struct i2c_client *client,
goto err_disable_vref_reg; goto err_disable_vref_reg;
} }
pd = (inbuf[0] >> 1) & 0x3; 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->powerdown_mode = pd ? pd - 1 : 2; /* largest resistor to gnd */
data->dac_value = (inbuf[1] << 4) | (inbuf[2] >> 4); data->dac_value = (inbuf[1] << 4) | (inbuf[2] >> 4);
if (data->id == MCP4726) if (data->id == MCP4726)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment