Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28daeff6 authored by Kishon Vijay Abraham I's avatar Kishon Vijay Abraham I Committed by Bjorn Helgaas
Browse files

PCI: endpoint: Make ->remove() callback optional



Make ->remove() callback optional so that endpoint function drivers don't
have to populate empty ->remove() callback functions.

Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent f01f969e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -333,10 +333,11 @@ static int pci_epf_device_probe(struct device *dev)

static int pci_epf_device_remove(struct device *dev)
{
	int ret;
	int ret = 0;
	struct pci_epf *epf = to_pci_epf(dev);
	struct pci_epf_driver *driver = to_pci_epf_driver(dev->driver);

	if (driver->remove)
		ret = driver->remove(epf);
	epf->driver = NULL;