Skip to content

Commit

Permalink
i2c: mpc: use of_property_read_bool
Browse files Browse the repository at this point in the history
Use of_property_read_bool to check for the existence of a property.

Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
  • Loading branch information
JuliaLawall authored and Wolfram Sang committed Oct 27, 2017
1 parent d982d66 commit 750bd8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-mpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ static int fsl_i2c_probe(struct platform_device *op)
}
}

if (of_get_property(op->dev.of_node, "fsl,preserve-clocking", NULL)) {
if (of_property_read_bool(op->dev.of_node, "fsl,preserve-clocking")) {
clock = MPC_I2C_CLOCK_PRESERVE;
} else {
prop = of_get_property(op->dev.of_node, "clock-frequency",
Expand Down

0 comments on commit 750bd8b

Please sign in to comment.