i2c: mpc: use of_property_read_bool
authorJulia Lawall <Julia.Lawall@lip6.fr>
Fri, 5 Aug 2016 08:56:44 +0000 (10:56 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 27 Oct 2017 20:14:40 +0000 (22:14 +0200)
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>
drivers/i2c/busses/i2c-mpc.c

index 96caf378b1dc00e501936c60bab13070ce1836ab..2b221a514974376e204ea77d1c643fdecc5a2b79 100644 (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",