]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
mfd: mc13xxx-core: Use of_property_read_bool()
authorSaurabh Sengar <saurabh.truth@gmail.com>
Mon, 16 Nov 2015 09:13:17 +0000 (14:43 +0530)
committerLee Jones <lee.jones@linaro.org>
Fri, 4 Dec 2015 08:45:54 +0000 (08:45 +0000)
For checking if a property is present or not,
use of_property_read_bool instead of of_get_property()

Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/mc13xxx-core.c

index 3f9f4c874d2aa4c45505e2408c622e8f8c031af4..d7f54e492aa6103985e225b858d9b1c0dcd5b7c3 100644 (file)
@@ -383,16 +383,16 @@ static int mc13xxx_probe_flags_dt(struct mc13xxx *mc13xxx)
        if (!np)
                return -ENODEV;
 
-       if (of_get_property(np, "fsl,mc13xxx-uses-adc", NULL))
+       if (of_property_read_bool(np, "fsl,mc13xxx-uses-adc"))
                mc13xxx->flags |= MC13XXX_USE_ADC;
 
-       if (of_get_property(np, "fsl,mc13xxx-uses-codec", NULL))
+       if (of_property_read_bool(np, "fsl,mc13xxx-uses-codec"))
                mc13xxx->flags |= MC13XXX_USE_CODEC;
 
-       if (of_get_property(np, "fsl,mc13xxx-uses-rtc", NULL))
+       if (of_property_read_bool(np, "fsl,mc13xxx-uses-rtc"))
                mc13xxx->flags |= MC13XXX_USE_RTC;
 
-       if (of_get_property(np, "fsl,mc13xxx-uses-touch", NULL))
+       if (of_property_read_bool(np, "fsl,mc13xxx-uses-touch"))
                mc13xxx->flags |= MC13XXX_USE_TOUCHSCREEN;
 
        return 0;