From patchwork Tue Aug 20 14:58:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Saenz Julienne X-Patchwork-Id: 11103981 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 86FB2912 for ; Tue, 20 Aug 2019 14:59:39 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6534C233A1 for ; Tue, 20 Aug 2019 14:59:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HPTcdqbr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6534C233A1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QLQuY9T/K2+SQT/4v2Wx5KjshZcg9KMk6JJt1I/XOJM=; b=HPTcdqbrSkhAyV vzwcyxD6fSN2uGVwC2g67ar7HSAV+ykAmKr++OHUw/6dxrHeVuHiosIMWJ2Hd9N4J0sxmT+FZFzCi m1rh4cY21i5yqPs+GfKgy3txjxUuxcOmPr+VVmyuvVM5PK9NLh2ruCWrKPUreG3JWqie4ZPC7DtSf KIe7pd3LmaFbQuK2lyz/p2JW6dkoGVz4t7dbZmjMyoNMSCJbWPUP2iUr5wrDU86HHEG99chhtymuI omtSaORdrVxhm1+WuteVwB5KCu9OQ/k0M9uYORzVBI8YX9cwbtMpnLR+vNOnGb7ZyoH/sF42h3sJL fs//yeI4/3yEqAdZR2VQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i05bl-0005zw-Um; Tue, 20 Aug 2019 14:59:37 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i05ak-0004ys-2J; Tue, 20 Aug 2019 14:58:35 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C0C20AFC3; Tue, 20 Aug 2019 14:58:32 +0000 (UTC) From: Nicolas Saenz Julienne To: catalin.marinas@arm.com, hch@lst.de, wahrenst@gmx.net, marc.zyngier@arm.com, robh+dt@kernel.org, Robin Murphy , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-arch@vger.kernel.org, iommu@lists.linux-foundation.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, Frank Rowand Subject: [PATCH v2 03/11] of/fdt: add of_fdt_machine_is_compatible function Date: Tue, 20 Aug 2019 16:58:11 +0200 Message-Id: <20190820145821.27214-4-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190820145821.27214-1-nsaenzjulienne@suse.de> References: <20190820145821.27214-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190820_075834_251712_B55B807E X-CRM114-Status: UNSURE ( 6.90 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: phill@raspberryi.org, f.fainelli@gmail.com, linux-kernel@vger.kernel.org, eric@anholt.net, mbrugger@suse.com, linux-rpi-kernel@lists.infradead.org, akpm@linux-foundation.org, will@kernel.org, nsaenzjulienne@suse.de, m.szyprowski@samsung.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Provides the same functionality as of_machine_is_compatible. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring --- Changes in v2: None drivers/of/fdt.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 9cdf14b9aaab..06ffbd39d9af 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -802,6 +802,13 @@ const char * __init of_flat_dt_get_machine_name(void) return name; } +static const int __init of_fdt_machine_is_compatible(char *name) +{ + unsigned long dt_root = of_get_flat_dt_root(); + + return of_flat_dt_is_compatible(dt_root, name); +} + /** * of_flat_dt_match_machine - Iterate match tables to find matching machine. *