summaryrefslogtreecommitdiff
path: root/drivers/pci/endpoint/pci-epf-core.c
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2017-03-27 12:45:01 +0300
committerBjorn Helgaas <bhelgaas@google.com>2017-04-11 22:18:37 +0300
commit3a401a2ce1cb6f6e52b78f21aa82e5d90e35c430 (patch)
tree348b395dea242f37306da3a493c779fc3fd88ca8 /drivers/pci/endpoint/pci-epf-core.c
parentbea37d3d3121d051b12541f06327d7ac63996fc0 (diff)
downloadlinux-3a401a2ce1cb6f6e52b78f21aa82e5d90e35c430.tar.xz
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-epf-core.c')
-rw-r--r--drivers/pci/endpoint/pci-epf-core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/endpoint/pci-epf-core.c b/drivers/pci/endpoint/pci-epf-core.c
index a281c599a504..6877d6a5bcc9 100644
--- a/drivers/pci/endpoint/pci-epf-core.c
+++ b/drivers/pci/endpoint/pci-epf-core.c
@@ -24,6 +24,7 @@
#include <linux/pci-epc.h>
#include <linux/pci-epf.h>
+#include <linux/pci-ep-cfs.h>
static struct bus_type pci_epf_bus_type;
static struct device_type pci_epf_type;
@@ -149,6 +150,7 @@ EXPORT_SYMBOL_GPL(pci_epf_alloc_space);
*/
void pci_epf_unregister_driver(struct pci_epf_driver *driver)
{
+ pci_ep_cfs_remove_epf_group(driver->group);
driver_unregister(&driver->driver);
}
EXPORT_SYMBOL_GPL(pci_epf_unregister_driver);
@@ -178,6 +180,8 @@ int __pci_epf_register_driver(struct pci_epf_driver *driver,
if (ret)
return ret;
+ driver->group = pci_ep_cfs_add_epf_group(driver->driver.name);
+
return 0;
}
EXPORT_SYMBOL_GPL(__pci_epf_register_driver);