Received: by 10.223.164.202 with SMTP id h10csp3820655wrb; Mon, 20 Nov 2017 05:38:36 -0800 (PST) X-Google-Smtp-Source: AGs4zMZsBk+2KcbE6C8JVz+yez8aebvE9/mSVTuRPW5T5+1i/+kXPUQ0Q6tZc50VTQYqzJRCFdIi X-Received: by 10.98.58.208 with SMTP id v77mr11457601pfj.150.1511185116682; Mon, 20 Nov 2017 05:38:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511185116; cv=none; d=google.com; s=arc-20160816; b=IXJ6IdPbwMPBwZ94X40SBMh/6PjmRcuRNsyYfTRXeClRqHl9NLYDoCvo8MGo+h80bD dFSTrhU2f8A22zuAzobRcae7nHfzVPQWrNPnYt92dw4Pf6NEQ3NrodKkQoCfgNT0evXN EGuhpPoC6popBMoqUGdQ1XMo0tLpPkIL3ihWcV6O42f5S8q1UX3oN9MPdINJp91Xoluf 3ZPUpyGvwKd+3dFdKbitkdSMR90p8KHPwfkn8/HoEEEodOGjS3Hsy2XD50Adz+5remsb FZhTtWfDgLgivn1LsD8HVodKccrMwLSeq2p1KKaugpoFa1PBTSOa53jS4iJb889Rr72Z A81g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=eiawFR4XPKHGrYWjD0KlZ0ZKv4bU8R0bg4yzo1OAmH0=; b=UPgChDBGLNYO6cDLnLbx4wXLcm0vPpw+VXK8RMBuCkY1w1D5yCEkcLjQaMEFGbnds5 0BLDhSa/zsMPXAJFgJ0KxQeqTf3SMcYLCtjmXUDIcCnF+/ObDVFCamOYde70LZzY9Yeo HWyi5W7tKCkIqk2X44yKH/oqFQHLSL3TSMaOTNTNJl4XmuW44jrC1oP4tfkYoEg/aQYe 5AV0RikVkUI7yCGP3aE8DcXsMmVJV2ArirU7L4/OF0jApJolBMaJ/o2fBIFk5mydk1T3 zDM8orcGJB+QwmAPOkmjz/6lcQu0Z7Ny0gPKQv7x+bN6SsCJHXc10t4Gr5eMbBSxqtPZ 8uSg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z19si4490850pff.152.2017.11.20.05.38.26; Mon, 20 Nov 2017 05:38:36 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751385AbdKTNdQ (ORCPT + 66 others); Mon, 20 Nov 2017 08:33:16 -0500 Received: from bastet.se.axis.com ([195.60.68.11]:39593 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751262AbdKTNdO (ORCPT ); Mon, 20 Nov 2017 08:33:14 -0500 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id AB1D9183AC; Mon, 20 Nov 2017 14:33:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at bastet.se.axis.com Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id SXEYnysDHmhW; Mon, 20 Nov 2017 14:33:10 +0100 (CET) Received: from boulder02.se.axis.com (boulder02.se.axis.com [10.0.8.16]) by bastet.se.axis.com (Postfix) with ESMTPS id 65BA5183B3; Mon, 20 Nov 2017 14:33:10 +0100 (CET) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4606F1A08E; Mon, 20 Nov 2017 14:33:10 +0100 (CET) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 389751A070; Mon, 20 Nov 2017 14:33:10 +0100 (CET) Received: from seth.se.axis.com (unknown [10.0.2.172]) by boulder02.se.axis.com (Postfix) with ESMTP; Mon, 20 Nov 2017 14:33:10 +0100 (CET) Received: from lnxartpec1.se.axis.com (lnxartpec1.se.axis.com [10.88.4.10]) by seth.se.axis.com (Postfix) with ESMTP id 2BFF6198F; Mon, 20 Nov 2017 14:33:10 +0100 (CET) Received: by lnxartpec1.se.axis.com (Postfix, from userid 20283) id 27D66400FE; Mon, 20 Nov 2017 14:33:10 +0100 (CET) From: Niklas Cassel To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Bjorn Helgaas Cc: Niklas Cassel , linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 08/18] PCI: dwc: dra7xx: Assign pp->ops in dra7xx_add_pcie_port() rather than in probe Date: Mon, 20 Nov 2017 14:32:11 +0100 Message-Id: <20171120133222.27771-9-niklas.cassel@axis.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171120133222.27771-1-niklas.cassel@axis.com> References: <20171120133222.27771-1-niklas.cassel@axis.com> X-TM-AS-GCONF: 00 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Assign pp->ops in *_add_pcie_port() to match how it is done in other drivers like exynos, imx7, keystone, armada8k, artpec6, designware-plat, hisi, kirin and spear13xx. This is probably a remainder since when dev and ops were assigned as members to pp. Since we now assign them as members to struct dw_pcie, the pp->ops assignment should definitely be in dra7xx_add_pcie_port(). This is done so that the compiler (in a later commit) can remove more code when enabling only one of the two supported modes (host/ep) in the dra7xx driver. Signed-off-by: Niklas Cassel Acked-by: Kishon Vijay Abraham I --- drivers/pci/dwc/pci-dra7xx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pci/dwc/pci-dra7xx.c b/drivers/pci/dwc/pci-dra7xx.c index d330b7d86ce3..07c74ae3614e 100644 --- a/drivers/pci/dwc/pci-dra7xx.c +++ b/drivers/pci/dwc/pci-dra7xx.c @@ -461,6 +461,8 @@ static int __init dra7xx_add_pcie_port(struct dra7xx_pcie *dra7xx, if (!pci->dbi_base) return -ENOMEM; + pp->ops = &dra7xx_pcie_host_ops; + ret = dw_pcie_host_init(pp); if (ret) { dev_err(dev, "failed to initialize host\n"); @@ -590,7 +592,6 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev) void __iomem *base; struct resource *res; struct dw_pcie *pci; - struct pcie_port *pp; struct dra7xx_pcie *dra7xx; struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; @@ -618,9 +619,6 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev) pci->dev = dev; pci->ops = &dw_pcie_ops; - pp = &pci->pp; - pp->ops = &dra7xx_pcie_host_ops; - irq = platform_get_irq(pdev, 0); if (irq < 0) { dev_err(dev, "missing IRQ resource: %d\n", irq); -- 2.14.2 From 1584799691941432920@xxx Wed Nov 22 20:32:42 +0000 2017 X-GM-THRID: 1584797201651333865 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread