Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752573AbbKPJOf (ORCPT ); Mon, 16 Nov 2015 04:14:35 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:34380 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752226AbbKPJOb (ORCPT ); Mon, 16 Nov 2015 04:14:31 -0500 From: Saurabh Sengar To: lee.jones@linaro.org, linux-kernel@vger.kernel.org Cc: Saurabh Sengar Subject: [PATCH] mfd: mc13xxx-core: use of_property_read_bool() Date: Mon, 16 Nov 2015 14:43:17 +0530 Message-Id: <1447665197-26501-1-git-send-email-saurabh.truth@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1433 Lines: 41 for checking if a property is present or not, use of_property_read_bool instead of of_get_property() Signed-off-by: Saurabh Sengar --- drivers/mfd/mc13xxx-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c index 3f9f4c8..d7f54e4 100644 --- a/drivers/mfd/mc13xxx-core.c +++ b/drivers/mfd/mc13xxx-core.c @@ -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; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/