Message ID | 20190926112933.8922-11-kishon@ti.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1920468ill; Thu, 26 Sep 2019 04:31:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqymaglXbJTGLpWeJrk6HvXsDZTcBY+VCV0Zz5XLZSgO0m/1VuLRVZdeTZjZvUFCiQv0bhLT X-Received: by 2002:a50:cd1a:: with SMTP id z26mr2943027edi.75.1569497487249; Thu, 26 Sep 2019 04:31:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569497487; cv=none; d=google.com; s=arc-20160816; b=HgX7P564QDsOpFBF3dVSi+uBnLo9ODwQ/vY3mBLcn0JMv/tdi8CEdcCqBv36jEyouR c1I7hxCOH4njkgQHVcrindwXm06VDBCAzOrrhLN/mB3T09Kg6VryxkEUBMJ9G21Lnhzy hMeBBN27lxzbHp0ojhtiLAN02xxRGb7DWR5vU2M4a6m8LYtf9zAd53v5rSXh4YoCVXw/ QoGf5gdoJWQOJwZvsKA2zo2DE5JaUALrgUrWgwv/kpTelB0TgAUYVYBagHhqrK76vd9G kydK55xYzQ4lDW5zOnf26O61oBa4IEEKa0om2t9uT9hYjm18DRyaAgK9Vu7mDzpTSBWd X/TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=E2GTTExAvbZbBjqJm7peVu26RwtsAEY0HmYYy9aUZio=; b=kFWIMvn/o0YcXm4SnQgAxAVj0jdUjK94AYGO+9/sYcjSRJs23YxC2OFCZ+1lT5cMAU G9KEUlORedOIJv+1ll0BmbIfnWV4OChHjEJ2Sg8lNa3VPv3mt2awTLLoqaYUMcHE8u/M CZW2tNJy4iQjEo1kWCWh20RStK4RcDUHtSVWnArkDrX8ddDZg03YJ+8qoLlzeeaGUdtJ xx8kKjpzYWwyio23rH14KguIZvwHHGmqKrNicQRbnkgxT52blfavZ0aiChv6Ka8pOaR/ 2Hyl9efn7OfKIgPHTvs0f4KbiOXv1UBUlS81RBu7jZhx7Za+MqZ7l3Mrg4TGg52yPrLR cW1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="Sc6WLz/r"; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: <devicetree-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s21si855087eja.226.2019.09.26.04.31.27; Thu, 26 Sep 2019 04:31:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="Sc6WLz/r"; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726505AbfIZLb0 (ORCPT <rfc822;steve.mcintyre@linaro.org> + 8 others); Thu, 26 Sep 2019 07:31:26 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:51028 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726030AbfIZLbX (ORCPT <rfc822; devicetree@vger.kernel.org>); Thu, 26 Sep 2019 07:31:23 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8QBVGt5042493; Thu, 26 Sep 2019 06:31:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569497476; bh=E2GTTExAvbZbBjqJm7peVu26RwtsAEY0HmYYy9aUZio=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Sc6WLz/rgCEjTalAjHyyN/dl7vJRBPT5G+xMCus7Zdk+xUmOS/jli4Wl1k39juA5g NqqLx7JqQXazDe/Uwihqes0fkvz0VlyzEoKmz7611/wgXt1IJjHEjjIhu9ci208c0R K0uutCj06xnxsrpSCNJxwnjOpoe43EMooUR/B+is= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8QBVGH3013966; Thu, 26 Sep 2019 06:31:16 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 26 Sep 2019 06:31:15 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 26 Sep 2019 06:31:08 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8QBUTk3069017; Thu, 26 Sep 2019 06:31:12 -0500 From: Kishon Vijay Abraham I <kishon@ti.com> To: Bjorn Helgaas <bhelgaas@google.com>, Jonathan Corbet <corbet@lwn.net>, Rob Herring <robh+dt@kernel.org>, Jon Mason <jdmason@kudzu.us>, Dave Jiang <dave.jiang@intel.com>, Allen Hubbe <allenbh@gmail.com>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> CC: Mark Rutland <mark.rutland@arm.com>, <kishon@ti.com>, <linux-pci@vger.kernel.org>, <linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-ntb@googlegroups.com> Subject: [RFC PATCH 10/21] PCI: endpoint: Make pci_epf_driver ops optional Date: Thu, 26 Sep 2019 16:59:22 +0530 Message-ID: <20190926112933.8922-11-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190926112933.8922-1-kishon@ti.com> References: <20190926112933.8922-1-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: <devicetree.vger.kernel.org> X-Mailing-List: devicetree@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/pci/endpoint/pci-epf-core.c b/drivers/pci/endpoint/pci-epf-core.c index c74c7cc6d8bd..67015c66d09f 100644 --- a/drivers/pci/endpoint/pci-epf-core.c +++ b/drivers/pci/endpoint/pci-epf-core.c @@ -446,11 +446,9 @@ int __pci_epf_register_driver(struct pci_epf_driver *driver, { int ret; - if (!driver->ops) - return -EINVAL; - - if (!driver->ops->bind || !driver->ops->unbind) - return -EINVAL; + if (!driver->ops || !driver->ops->bind || !driver->ops->unbind) + pr_debug("%s: Supports only pci_epf device created using DT\n", + driver->driver.name); driver->driver.bus = &pci_epf_bus_type; driver->driver.owner = owner;
pci_epf_driver had two ops for bind and unbind which will be invoked when an endpoint controller is bound to an endpoint function (using configfs). Now that endpoint core has support to define an endpoint function using device tree alone, the bind and unbind ops can be optional. Make pci_epf_driver ops optional here. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> --- drivers/pci/endpoint/pci-epf-core.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- 2.17.1