diff mbox series

[3/8] PCI: endpoint: Add an API for unregistering the EPF notifier

Message ID 20220502060611.58987-4-manivannan.sadhasivam@linaro.org
State New
Headers show
Series [1/8] PCI: endpoint: Pass EPF device ID to the probe function | expand

Commit Message

Manivannan Sadhasivam May 2, 2022, 6:06 a.m. UTC
Add "pci_epc_unregister_notifier()" to unregister the notifier added
between EPC and EPF.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 include/linux/pci-epc.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h
index a48778e1a4ee..c414a08bfd67 100644
--- a/include/linux/pci-epc.h
+++ b/include/linux/pci-epc.h
@@ -198,6 +198,12 @@  pci_epc_register_notifier(struct pci_epc *epc, struct notifier_block *nb)
 	return atomic_notifier_chain_register(&epc->notifier, nb);
 }
 
+static inline int
+pci_epc_unregister_notifier(struct pci_epc *epc, struct notifier_block *nb)
+{
+	return atomic_notifier_chain_unregister(&epc->notifier, nb);
+}
+
 struct pci_epc *
 __devm_pci_epc_create(struct device *dev, const struct pci_epc_ops *ops,
 		      struct module *owner);