From patchwork Fri Mar 10 14:46:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 13169353 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2EF0C64EC4 for ; Fri, 10 Mar 2023 14:48:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=T/GO/oayrdLN+B53jLzTHKTucLz0QGhVcG0vOrfNXdY=; b=hwFUTKu0lp7Pm+ ok8FQvqqV6nQFFxrNXIrJXgg0hD4IU3ebRQf5SJEqxRfFOkUW6i1D5wBj7HI15cpSO0h9K/sIqlu+ v+dgaOpcwmoXkFqER4pJEadHwmz3szOKPzfN5YMA6iGwysWeAVJbYiVLN36n2dTEAjC8K1a/d+3is ctissV4BL6zq5aEcLxCxjV8J/ovQT8cFh8kCqAj4c0BjCysoYXNfXFhh2+KOnH6jB6OEO+gw/f93H 7saQs4/I2GrH12qPOoL12dh6F9vEaiObaYjY7Q03/J51rIA9urIaVRwQKkB6SwA5cFM9H9FHHLIZj AkNRUx3O8RwSe+TLUFlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pae1q-00Emdz-Vc; Fri, 10 Mar 2023 14:47:31 +0000 Received: from mail-oa1-f43.google.com ([209.85.160.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pae1M-00EmTh-SZ for linux-arm-kernel@lists.infradead.org; Fri, 10 Mar 2023 14:47:02 +0000 Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-17638494edbso6031221fac.10 for ; Fri, 10 Mar 2023 06:47:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678459619; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ze4x2UjW4SC+7SgOWlyCc0ynsM258m+gI2GkQIZTPMI=; b=HeT1MqdY3WuH87ZQU6C+xztNzyaUSMPRnW+Co6AeU6w9KVoj+LuWlUd2jdzlzfMdNn 8ty/YoiQ/Lbumg+gbKDtIR8MMrJ7eh/pVFC+2jvqV3GqA2TITkp13BejNCtbdR5kkUgK 4M3dUW96YC9K8kcMlSPCfvjMoTKYGa1tPsDzVX5C281hJQOoFqjSMe9SOEVzpk28bi8s rATf1Izifwxi1KAMf9wF/Upyo8ZdhI7nSU+hh4JcVWDVR5mizrJi0+j27ZRe7lOcl10i WTF6oEgBP1AUaeNBfB9uII04bdc6ScDTqfIpkn6nWcYCuypmS41HFhwNU7tNo4tB7GHt RJAQ== X-Gm-Message-State: AO0yUKULnCi7jectVzJdDg8qFRpn/1KGDmddgURQEcCPglLBI2X8zrxL fbT+N6t9CjKn3e9TmvFFXA== X-Google-Smtp-Source: AK7set82KIT56SQJ6WqeSwMPkCDv0B0eHIXclgRxzxBAzHabdT7fVwRv6tyCkq20rhBO+1pi1bynLQ== X-Received: by 2002:a05:6870:73cc:b0:176:4920:bf8c with SMTP id a12-20020a05687073cc00b001764920bf8cmr16477103oan.55.1678459619557; Fri, 10 Mar 2023 06:46:59 -0800 (PST) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id e15-20020a056871044f00b0016e9308e17bsm73055oag.52.2023.03.10.06.46.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 06:46:59 -0800 (PST) Received: (nullmailer pid 1540838 invoked by uid 1000); Fri, 10 Mar 2023 14:46:55 -0000 From: Rob Herring To: =?utf-8?q?Beno=C3=AEt_Cousson?= , Paul Walmsley , Tony Lindgren , Russell King Cc: devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: omap2: Use of_property_read_bool() for boolean properties Date: Fri, 10 Mar 2023 08:46:55 -0600 Message-Id: <20230310144655.1540793-1-robh@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230310_064700_944395_DE90AF36 X-CRM114-Status: GOOD ( 13.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org It is preferred to use typed property access functions (i.e. of_property_read_ functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring --- arch/arm/mach-omap2/omap_hwmod.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 5a2a9b8e61ed..989195f6f7be 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -2322,11 +2322,11 @@ static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data, static void __init parse_module_flags(struct omap_hwmod *oh, struct device_node *np) { - if (of_find_property(np, "ti,no-reset-on-init", NULL)) + if (of_property_read_bool(np, "ti,no-reset-on-init")) oh->flags |= HWMOD_INIT_NO_RESET; - if (of_find_property(np, "ti,no-idle-on-init", NULL)) + if (of_property_read_bool(np, "ti,no-idle-on-init")) oh->flags |= HWMOD_INIT_NO_IDLE; - if (of_find_property(np, "ti,no-idle", NULL)) + if (of_property_read_bool(np, "ti,no-idle")) oh->flags |= HWMOD_NO_IDLE; }