MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / pci_shutdown

Function pci_shutdown

components/drivers/pci/pci.c:986–1005  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

984}
985
986static rt_err_t pci_shutdown(rt_device_t dev)
987{
988 struct rt_pci_bus *bus;
989 struct rt_pci_driver *pdrv = rt_container_of(dev->drv, struct rt_pci_driver, parent);
990 struct rt_pci_device *pdev = rt_container_of(dev, struct rt_pci_device, parent);
991
992 if (pdrv && pdrv->shutdown)
993 {
994 pdrv->shutdown(pdev);
995 }
996
997 rt_pci_enable_wake(pdev, RT_PCI_D0, RT_FALSE);
998
999 bus = pdev->bus;
1000 rt_pci_device_remove(pdev);
1001 /* Just try to remove */
1002 rt_pci_bus_remove(bus);
1003
1004 return RT_EOK;
1005}
1006
1007static struct rt_bus pci_bus =
1008{

Callers

nothing calls this directly

Calls 3

rt_pci_enable_wakeFunction · 0.85
rt_pci_device_removeFunction · 0.85
rt_pci_bus_removeFunction · 0.85

Tested by

no test coverage detected