diff options
author | Damien Le Moal <dlemoal@kernel.org> | 2023-04-15 11:35:27 +0900 |
---|---|---|
committer | Lorenzo Pieralisi <lpieralisi@kernel.org> | 2023-05-08 09:16:06 +0200 |
commit | 893f14fed7d38c47e1e006917629f52587b6628f (patch) | |
tree | a9bcc5d87d365143de4caab630620da174db98ed /drivers/pci/endpoint/pci-epf-core.c | |
parent | 01c68988addfd6d6f580f034b7d4cdfd1e1a0cd7 (diff) | |
download | linux-next-893f14fed7d38c47e1e006917629f52587b6628f.tar.gz |
PCI: endpoint: Move pci_epf_type_add_cfs() code
pci_epf_type_add_cfs() is called only from pci_ep_cfs_add_type_group()
in drivers/pci/endpoint/pci-ep-cfs.c, so there is no need to export this
function and we can move its code from pci-epf-core.c to pci-ep-cfs.c
as a static function.
Link: https://lore.kernel.org/r/20230415023542.77601-3-dlemoal@kernel.org
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Diffstat (limited to 'drivers/pci/endpoint/pci-epf-core.c')
-rw-r--r-- | drivers/pci/endpoint/pci-epf-core.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/pci/endpoint/pci-epf-core.c b/drivers/pci/endpoint/pci-epf-core.c index 2036e38be093..355a6f56fcea 100644 --- a/drivers/pci/endpoint/pci-epf-core.c +++ b/drivers/pci/endpoint/pci-epf-core.c @@ -21,38 +21,6 @@ static struct bus_type pci_epf_bus_type; static const struct device_type pci_epf_type; /** - * pci_epf_type_add_cfs() - Help function drivers to expose function specific - * attributes in configfs - * @epf: the EPF device that has to be configured using configfs - * @group: the parent configfs group (corresponding to entries in - * pci_epf_device_id) - * - * Invoke to expose function specific attributes in configfs. If the function - * driver does not have anything to expose (attributes configured by user), - * return NULL. - */ -struct config_group *pci_epf_type_add_cfs(struct pci_epf *epf, - struct config_group *group) -{ - struct config_group *epf_type_group; - - if (!epf->driver) { - dev_err(&epf->dev, "epf device not bound to driver\n"); - return NULL; - } - - if (!epf->driver->ops->add_cfs) - return NULL; - - mutex_lock(&epf->lock); - epf_type_group = epf->driver->ops->add_cfs(epf, group); - mutex_unlock(&epf->lock); - - return epf_type_group; -} -EXPORT_SYMBOL_GPL(pci_epf_type_add_cfs); - -/** * pci_epf_unbind() - Notify the function driver that the binding between the * EPF device and EPC device has been lost * @epf: the EPF device which has lost the binding with the EPC device |