From patchwork Mon Aug 15 15:31:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 9281427 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2BB22607FD for ; Mon, 15 Aug 2016 15:31:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D2E628D29 for ; Mon, 15 Aug 2016 15:31:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 11E9128D32; Mon, 15 Aug 2016 15:31:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8791328D29 for ; Mon, 15 Aug 2016 15:31:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752956AbcHOPbm (ORCPT ); Mon, 15 Aug 2016 11:31:42 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:36290 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752946AbcHOPbl (ORCPT ); Mon, 15 Aug 2016 11:31:41 -0400 Received: by mail-pa0-f67.google.com with SMTP id ez1so3763383pab.3; Mon, 15 Aug 2016 08:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dj+jOKnzhhQTZuGGJOIrkoSAY1jOTW+jtvAlJAT9gAE=; b=ShMYQFS3snnObuxA80lBL027g5Uwlm4QCqvpIM3yuZ1DQ0rMVgHsZzWMkE/SbuW9tR w8BmX6/ZUqQa1I6kMfeMYz9YmwBYxOxYA+4U6+sn2ob7cqeLHE5bSGq4jqJvrW68WjA7 TPiqenj5cidHaL9Kv5zAh+/FZWbw9jigi545oApdePxSNd49vo/kUl8YhrEIf3eXZ+oZ aVUDlxh2Sy6fu0kSWn4j8w/90gvIJuNIbNwubBpJcc3dW8hLQO3w3COW3jbdLyoGzM/R gnvpm0sduWFwbCvbdSNrTRhPFLdALxcQ1SkhiavlNRBcSCiB67ilHZ4nHAjigOqBNlTL qFuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dj+jOKnzhhQTZuGGJOIrkoSAY1jOTW+jtvAlJAT9gAE=; b=epdr8aZIkEBVotpHodhLSzb1ch+iCEYfB4/cDt5DDnQJBc+eJr25Ndf/Hne4QGcyRs iTkQV6CncZyz7Dmlm1+0sEWT7x1+JwggJ3SQPJi6VquX0DcUAK+ZztG9+aVW0tdnnTcE QzMKLYVDCWLb83JD9tKJWQYfOUJo/4RXb9kUif/2Kr075YBTGDqUAtvYtdHsdtipS1GS 1pBXrsFBlRKkopaaVun+f+zyft2vsM5fb+LfjFkKvfVdLUxt2q/Xpy5afBNasnRPYCaZ Ksa+I0IPWP1auOAxxra2fJaiKBrrUX4bCqqdFVpTmzOCGwLxg/MyHnSRNTe4syzVW7Lf W8VQ== X-Gm-Message-State: AEkooutrcsyvPEtuFE0XiFE1Gb9/fARRGkuiEfwxj6npJBSnR7iIL29N3s+N3KsSf+zNgQ== X-Received: by 10.66.66.203 with SMTP id h11mr4058892pat.5.1471275100336; Mon, 15 Aug 2016 08:31:40 -0700 (PDT) Received: from localhost (port-17579.pppoe.wtnet.de. [46.59.130.70]) by smtp.gmail.com with ESMTPSA id c7sm32404291pfj.25.2016.08.15.08.31.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Aug 2016 08:31:39 -0700 (PDT) From: Thierry Reding To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH 2/2] PCI: tegra: Use of_device_get_match_data() Date: Mon, 15 Aug 2016 17:31:32 +0200 Message-Id: <20160815153132.520-2-thierry.reding@gmail.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160815153132.520-1-thierry.reding@gmail.com> References: <20160815153132.520-1-thierry.reding@gmail.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding This function was introduced a couple of releases ago to help reduce the the boilerplate required to get at the SoC specific data. Signed-off-by: Thierry Reding --- drivers/pci/host/pci-tegra.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c index 7756a792600c..2d520755b1d7 100644 --- a/drivers/pci/host/pci-tegra.c +++ b/drivers/pci/host/pci-tegra.c @@ -2201,21 +2201,16 @@ remove: static int tegra_pcie_probe(struct platform_device *pdev) { - const struct of_device_id *match; struct tegra_pcie *pcie; int err; - match = of_match_device(tegra_pcie_of_match, &pdev->dev); - if (!match) - return -ENODEV; - pcie = devm_kzalloc(&pdev->dev, sizeof(*pcie), GFP_KERNEL); if (!pcie) return -ENOMEM; + pcie->soc = of_device_get_match_data(&pdev->dev); INIT_LIST_HEAD(&pcie->buses); INIT_LIST_HEAD(&pcie->ports); - pcie->soc = match->data; pcie->dev = &pdev->dev; err = tegra_pcie_parse_dt(pcie);