From patchwork Fri Nov 16 22:10:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 151380 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp958112ljp; Fri, 16 Nov 2018 14:11:12 -0800 (PST) X-Google-Smtp-Source: AJdET5eE4IM1fZaiFAk9EyXVnoDMk5uieJlwfvHeZSJTMe02Hrfea8DI/RfYlUYeomuc9E2ZBaNQ X-Received: by 2002:a62:1f5a:: with SMTP id f87-v6mr12199270pff.92.1542406272112; Fri, 16 Nov 2018 14:11:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542406272; cv=none; d=google.com; s=arc-20160816; b=XQDSLFu0gc04+M0UtFUYCrDivhXVeIz0vLnd+i4n/2SAAEXLLA5PIxL1E68/XrPsso 35Nj1TaiztV2TruOFISioXLN1zUGkFRTGtxDrsER8fzN6x0bEB73q6yGIOP/o7N5no6a wuL8+Y9p1jLisa/5rshswOJKfVhEziqBzf7dBUQnsQbaoesikyMnkz2ElldBHTE5T528 ilNAkL7j8sXkOB0DyRbvB59DDqwGGy2VxF+vdsJLMYNhjkLA8WKF1QrfKhrTdcdcmu9A 97Asoc1Pi4jXar86A7smAdgJtS/4wJBjQ+5+AUUNS836QkDM0JUM+FW71omWXWRCv0nv 2p9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=z20+2CzOTLX/2B946rI2J1ZHpCgM0oKasDbqmx4HY5Y=; b=MWIS/k9s5JWRMThYdeLjLOmHhkDhyPjKiuxnruld+W0+jpZ4/A6if13rh6mlbYucDG GhHsjZoO6GkIQCn6xB2rKOHLJf8NKYCuYR/O9yRZdvZFxTLTVumjDz2gwDusy7RlAN+f johEy8iD5WWGWbJYNGKrN4B8ndyJVzjyD+dgchPaStJiM2pipe9cdOB1PZ2fnN3m8ulv AQH0prU0nomF2ybhFHI4wDhA1byp8JWV5M7rcde1m8HZu7Stn4Z0RFD5hK3ZWxq9BdG+ hGJVce3jV+DrIAZNmUTHYM7OljfSpNl9Kd14tNCqjBKJFtYwfZJBAKbjg4YxS1e5Kk9N WETg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r22si2283805pgl.537.2018.11.16.14.11.11; Fri, 16 Nov 2018 14:11:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729671AbeKQIZT (ORCPT + 32 others); Sat, 17 Nov 2018 03:25:19 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:34337 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725995AbeKQIZS (ORCPT ); Sat, 17 Nov 2018 03:25:18 -0500 Received: by mail-ot1-f66.google.com with SMTP id t5so22780341otk.1; Fri, 16 Nov 2018 14:11:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=z20+2CzOTLX/2B946rI2J1ZHpCgM0oKasDbqmx4HY5Y=; b=M2NdLCHxbYtrPKCw/dgm5o+x1MCWpb/U+p/Dx/jDee4E7hxzPxq6dfHYxhf/1vHOGL 9E9SE9ZL40EQvZFqfDBUqh86bDQvJJnvCrp65vYviIM9rjFSlLQke+zEuSKk5hFKLhXd EmUUY5a8/XawVDa/CKmGXV1TluAysMpyRVhXs7hbLEGoCiUNk6ltHOcjsDP2KEpJFNAO 9+xXCqMZH+UZ4aMUHLyRUGBlAPUa1k5ytC9eYYuyBff9kk0GSBDR+GQ0LiSxemNU4lME 2wcue1yFDQh/fDurBJP9Au8L1Zn+X+SKgwRz1mNbMf0jwal/Ury70d6IqRyYxBN09Xi7 NCeg== X-Gm-Message-State: AGRZ1gLqCl2xVoBnd295kbZVU+SuTTjk9bV9ADl3AS6RG9Ez/hpRauNk nQWKYYLRS2k/QVJYwiTXYT/uGwb5IA== X-Received: by 2002:a9d:118a:: with SMTP id v10mr7014258otf.281.1542406267698; Fri, 16 Nov 2018 14:11:07 -0800 (PST) Received: from localhost.localdomain (mobile-166-173-57-127.mycingular.net. [166.173.57.127]) by smtp.googlemail.com with ESMTPSA id p204-v6sm12142631oib.25.2018.11.16.14.11.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Nov 2018 14:11:07 -0800 (PST) From: Rob Herring To: James Hogan Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Ralf Baechle , Paul Burton , linux-mips@linux-mips.org Subject: [PATCH] MIPS: Use device_type helpers to access the node type Date: Fri, 16 Nov 2018 16:10:58 -0600 Message-Id: <20181116221104.23024-2-robh@kernel.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove directly accessing device_node.type pointer and use the accessors instead. This will eventually allow removing the type pointer. Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@linux-mips.org Signed-off-by: Rob Herring --- arch/mips/pci/pci-rt3883.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.19.1 diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c index 958899ffe99c..bafbf69e7dc4 100644 --- a/arch/mips/pci/pci-rt3883.c +++ b/arch/mips/pci/pci-rt3883.c @@ -445,8 +445,7 @@ static int rt3883_pci_probe(struct platform_device *pdev) /* find the PCI host bridge child node */ for_each_child_of_node(np, child) { - if (child->type && - of_node_cmp(child->type, "pci") == 0) { + if (of_node_is_type(child, "pci")) { rpc->pci_controller.of_node = child; break; } @@ -464,8 +463,7 @@ static int rt3883_pci_probe(struct platform_device *pdev) for_each_available_child_of_node(rpc->pci_controller.of_node, child) { int devfn; - if (!child->type || - of_node_cmp(child->type, "pci") != 0) + if (!of_node_is_type(child, "pci")) continue; devfn = of_pci_get_devfn(child);