Message ID | 20230310144714.1543767-1-robh@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 7036FC64EC4 for <linux-arm-kernel@archiver.kernel.org>; Fri, 10 Mar 2023 15:47:26 +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=hFIIKVQdWwWaiAuGq9/6+5J51x64teI/FkvPywB/fpk=; b=uSkbRh/668ffJf 5t/6TixyV4DMy9dUQtjxMli8o5QWjG4XQIny62JYnYfgapPTdYVlsKL4eSzrl2c9q0Oqsp8nVzRm4 jAIA0k9KjHmn9SzQM9rMp8DsPx/M6xqLxsUjRhyPeOADvpeKcfvF13NIYf6lMw4Sngaw7zFAxZPpa v5C3AhqXuSm/uZBbB7Eop/0J13dmYbgMempTlAvxmB/zeYFnK346StitPx+PMak8WZmlk8wfwdE6o v3Gr/4MCZSBZNgvkXip42gThumTVI9gKVb5+STzM0zpnWTL1Rv+NkJYkYIP02hMqeNbP803BFjF8b PthFsaFr3BFxl9XY/5YQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1paewv-00F48H-7p; Fri, 10 Mar 2023 15:46:29 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1paewh-00F417-OD for linux-arm-kernel@bombadil.infradead.org; Fri, 10 Mar 2023 15:46:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=gIsj2WC67R0QYaUVMrSWcmPH0Rz9P/s3jlTMUe0suxA=; b=LyWqY/k6qiPlLC3gW5XFJAgZB5 Gdok2KapjY6a2vIkXCPb12kN95fGulWV20NOn9fV56zts55VVxWFcmQ3Fi27G0T9WzLzkAaH4pGQM UHUEfstaLBMJe2ppLrXu7dx9gkdK1p02zeCCAAzYpr3YLyRDf1sI0Dck/djIbPX4/fqvWY9cN20FK o2vm1I5iBAVVLoSdks8Q5G0d/cxr1AgbrfzVUu6t1QWDOicx/xHfTspjjan+P5lMTPxIiYx3GwmbO jKPosQ9vew14GFxGTbUyE2fcvMt8w+ELs11LjQlfA2qJdYKyyItICmXlzXBuVkL8S9CNfVhuS8qiI tZYLsDBw==; Received: from mail-ot1-f54.google.com ([209.85.210.54]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pae27-000USy-1k for linux-arm-kernel@lists.infradead.org; Fri, 10 Mar 2023 14:48:15 +0000 Received: by mail-ot1-f54.google.com with SMTP id o4-20020a9d6d04000000b00694127788f4so3036807otp.6 for <linux-arm-kernel@lists.infradead.org>; Fri, 10 Mar 2023 06:47:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678459664; 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=gIsj2WC67R0QYaUVMrSWcmPH0Rz9P/s3jlTMUe0suxA=; b=5J6uvbv9DxX6fyo8jBwp9tAcmZ14sloDC++F2c+iCZQLY5bdE6iNXkglRA/K1x322V aSjHBHB5MlI4hM453yaDgVbVbKNQ0z0Zl3AgVC4MpUsXwSKCq/wb9wTBWq9Qjpif6Vxg TVZF1JKy2pq+dpOjlgm+HI6PM/M3AyFROwkqPFiglFvIJrTM0DSlAeCIfdPGVfbUwYxl 46ruTC9gJEZgk3TKTgiEHt942MMO6D+Cc4bAeoyd1VmuUTMBkllr9P2QqzsyepkelpBK OE/ks1kdtPDWoAdzEkiMk+kxsb2Y60OjNZaNfkqx6A169XTjvCteSha43rbtoo60Qnnm V6EQ== X-Gm-Message-State: AO0yUKXKHeTvuUATBue2cdhhB/VZh4HBbvZXgVxb354zwqfmPcpY7I9v 2gvW5VvWAIbVJY1ohnxCNCkoeJS6FQ== X-Google-Smtp-Source: AK7set/+3mOkl+/k4Rr2TgpNfbxsa/tKL70X0mr92+aJ1X895GYyhQSFEdWZxUbKCxPmwh+UPoJULw== X-Received: by 2002:a05:6830:35b:b0:693:daa8:ec6f with SMTP id h27-20020a056830035b00b00693daa8ec6fmr12574633ote.1.1678459664381; Fri, 10 Mar 2023 06:47:44 -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 u25-20020a056830249900b0068be5ad8044sm135876ots.4.2023.03.10.06.47.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 06:47:43 -0800 (PST) Received: (nullmailer pid 1543793 invoked by uid 1000); Fri, 10 Mar 2023 14:47:14 -0000 From: Rob Herring <robh@kernel.org> To: Adrian Hunter <adrian.hunter@intel.com>, Michal Simek <michal.simek@xilinx.com>, Ulf Hansson <ulf.hansson@linaro.org> Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mmc: arasan: Use of_property_present() for testing DT property presence Date: Fri, 10 Mar 2023 08:47:14 -0600 Message-Id: <20230310144714.1543767-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_144747_697929_3580A2BE X-CRM114-Status: GOOD ( 13.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
mmc: arasan: Use of_property_present() for testing DT property presence
|
expand
|
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index 89c431a34c43..415f44bf5ee6 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -1434,7 +1434,7 @@ static void sdhci_arasan_unregister_sdclk(struct device *dev) { struct device_node *np = dev->of_node; - if (!of_find_property(np, "#clock-cells", NULL)) + if (!of_property_present(np, "#clock-cells")) return; of_clk_del_provider(dev->of_node);
It is preferred to use typed property access functions (i.e. of_property_read_<type> functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring <robh@kernel.org> --- drivers/mmc/host/sdhci-of-arasan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)