i2c: mpc: use of_property_read_bool

Use of_property_read_bool to check for the existence of a property.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
Julia Lawall 2016-08-05 10:56:44 +02:00 committed by Wolfram Sang
parent d982d66514
commit 750bd8b990
1 changed files with 1 additions and 1 deletions

View File

@ -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",