summaryrefslogtreecommitdiff
path: root/drivers/pci/endpoint/pci-epc-core.c
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2017-03-27 15:15:01 +0530
committerBjorn Helgaas <bhelgaas@google.com>2017-04-11 14:18:37 -0500
commit3a401a2ce1cb6f6e52b78f21aa82e5d90e35c430 (patch)
tree348b395dea242f37306da3a493c779fc3fd88ca8 /drivers/pci/endpoint/pci-epc-core.c
parentbea37d3d3121d051b12541f06327d7ac63996fc0 (diff)
PCI: endpoint: Create configfs entry for EPC device and EPF driver
Invoke APIs provided by pci-ep-cfs to create configfs entry for every EPC device and EPF driver to help users in creating EPF device and binding the EPF device to the EPC device. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/endpoint/pci-epc-core.c')
-rw-r--r--drivers/pci/endpoint/pci-epc-core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c
index 7c71dd94721c..caa7be10e473 100644
--- a/drivers/pci/endpoint/pci-epc-core.c
+++ b/drivers/pci/endpoint/pci-epc-core.c
@@ -24,6 +24,7 @@
#include <linux/pci-epc.h>
#include <linux/pci-epf.h>
+#include <linux/pci-ep-cfs.h>
static struct class *pci_epc_class;
@@ -442,6 +443,7 @@ EXPORT_SYMBOL_GPL(pci_epc_linkup);
*/
void pci_epc_destroy(struct pci_epc *epc)
{
+ pci_ep_cfs_remove_epc_group(epc->group);
device_unregister(&epc->dev);
kfree(epc);
}
@@ -508,6 +510,8 @@ __pci_epc_create(struct device *dev, const struct pci_epc_ops *ops,
if (ret)
goto put_dev;
+ epc->group = pci_ep_cfs_add_epc_group(dev_name(dev));
+
return epc;
put_dev: