iio: dac: mcp4725: Remove unneeded conversions to bool
Found with scripts/coccinelle/misc/boolconv.cocci. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6e93e26193
commit
f272f19cb6
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user