On Wed, 2024-01-31 at 15:12 -0600, Bjorn Helgaas wrote:
On Wed, Jan 31, 2024 at 10:00:23AM +0100, Philipp Stanner wrote:
The file pci.c is very large and contains a number of devres- functions. These functions should now reside in devres.c ...
+struct pci_devres *find_pci_dr(struct pci_dev *pdev) +{ + if (pci_is_managed(pdev)) + return devres_find(&pdev->dev, pcim_release, NULL, NULL); + return NULL; +} +EXPORT_SYMBOL(find_pci_dr);
find_pci_dr() was not previously exported, and I don't think it needs to be exported now, so I dropped the EXPORT_SYMBOL. It's still usable inside drivers/pci since it's declared in drivers/pci/pci.h; it's just not usable from modules. Let me know if I missed something.
No, ACK, you are right. I forgot this since find_pci_dr() is removed later anyways.
P.
-static struct pci_devres *find_pci_dr(struct pci_dev *pdev) -{ - if (pci_is_managed(pdev)) - return devres_find(&pdev->dev, pcim_release, NULL, NULL); - return NULL; -}