Received: by 10.223.164.221 with SMTP id h29csp139094wrb; Fri, 3 Nov 2017 06:52:23 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SLzfrRoKLtWooaEFQE5n3dRQY2AZ4HWJWOtYUmyNIpgv3yTJwkBzKkR+VyNvnek/UO3pM5 X-Received: by 10.84.244.136 with SMTP id h8mr6833317pll.84.1509717143725; Fri, 03 Nov 2017 06:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509717143; cv=none; d=google.com; s=arc-20160816; b=ksh7mnSAuRBgmJ9bhB9+5MatRAIFbrBxu2fReTlha5rHLRYaG3CYST6aphcrR/sxIs IZjuZoMo/GeyF5uFbyixns7gD9SA4ROpbyGmvwHh3S/thUQ1je/pvHA1lZVDO+JlZ42b XpeLvv3ibQUxTpdzNwBwewertH/0yP1paNMQjjxiJnyqd2BKxwvud8o4W+aPF6BUn/wL 42TF7d/VhH9ZNrAvrlzuvrobwHXANMITMKYnfDZm6SPD+2TxcS7YZpbzIrLqzz7zPYVm 2PCgCBlsrEaT8s2tzxOlvF++DWZlo9ja0+h5PoiD5l+2mqdWsBvpdQY0cHO/VxhEZuVC t/7w== 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=/PqqbzYFDPxi9nMYozOU98eYkqGdcjoREEccSVazOfg=; b=0V5eOQXKC1sr31hLbTA+zucAQ3V4KcCGHYBkxQUx3RwHLCwPcg7FF7Hx7+uuYKO3l1 W/V7qHFcucKxYp0wHfReeQEdawHmEF17bm23MZuStzYiSQfJvk0sOPUz5jzQ16a+3oLz R/3FyUqL0k+2kJ0nnYT0TpoPetovx8bPAiKYcvLWuZ2g4s64Vy0Eory6aWXDgw8os0D+ EZs0OXjNmp7/vMmxRUuBAjUK1egssJh3ic8mFd7nsY1ZuBf/IUfwIHv97/VsAahDs7sD CAMo4zjH0d7XOZk81ET7Jf4vkc+8KHfSRB2GB9xuNDKE9Xl1ginciPTQzwFQsja6WG5i 0kfg== 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 r6si4380116pls.575.2017.11.03.06.52.10; Fri, 03 Nov 2017 06:52:23 -0700 (PDT) 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 S1756387AbdKCNu7 (ORCPT + 95 others); Fri, 3 Nov 2017 09:50:59 -0400 Received: from bastet.se.axis.com ([195.60.68.11]:51585 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756080AbdKCNsO (ORCPT ); Fri, 3 Nov 2017 09:48:14 -0400 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 1AD5718919; Fri, 3 Nov 2017 14:48:13 +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 R2IpDxT1oj9w; Fri, 3 Nov 2017 14:48:11 +0100 (CET) Received: from boulder03.se.axis.com (boulder03.se.axis.com [10.0.8.17]) by bastet.se.axis.com (Postfix) with ESMTPS id F02C318955; Fri, 3 Nov 2017 14:48:10 +0100 (CET) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DA3B41E07B; Fri, 3 Nov 2017 14:48:10 +0100 (CET) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CECBD1E078; Fri, 3 Nov 2017 14:48:10 +0100 (CET) Received: from thoth.se.axis.com (unknown [10.0.2.173]) by boulder03.se.axis.com (Postfix) with ESMTP; Fri, 3 Nov 2017 14:48:10 +0100 (CET) Received: from lnxartpec1.se.axis.com (lnxartpec1.se.axis.com [10.88.4.10]) by thoth.se.axis.com (Postfix) with ESMTP id C29F525F2; Fri, 3 Nov 2017 14:48:10 +0100 (CET) Received: by lnxartpec1.se.axis.com (Postfix, from userid 20283) id BCD4D40101; Fri, 3 Nov 2017 14:48:10 +0100 (CET) From: Niklas Cassel To: Kishon Vijay Abraham I , Bjorn Helgaas Cc: Niklas Cassel , linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 08/17] PCI: dwc: dra7xx: Assign pp->ops in dra7xx_add_pcie_port() rather than in probe Date: Fri, 3 Nov 2017 14:47:12 +0100 Message-Id: <20171103134722.5532-9-niklas.cassel@axis.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171103134722.5532-1-niklas.cassel@axis.com> References: <20171103134722.5532-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 a743545da4d4..009f6aeeee1c 100644 --- a/drivers/pci/dwc/pci-dra7xx.c +++ b/drivers/pci/dwc/pci-dra7xx.c @@ -460,6 +460,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"); @@ -588,7 +590,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; @@ -616,9 +617,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 1586635516163052007@xxx Wed Dec 13 02:52:21 +0000 2017 X-GM-THRID: 1586635516163052007 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread