提交 f272f19c 编写于 作者: A Andrew F. Davis 提交者: Greg Kroah-Hartman

iio: dac: mcp4725: Remove unneeded conversions to bool

Found with scripts/coccinelle/misc/boolconv.cocci.
Signed-off-by: NAndrew F. Davis <afd@ti.com>
Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 6e93e261
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册