| 984 | } |
| 985 | |
| 986 | static 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 | |
| 1007 | static struct rt_bus pci_bus = |
| 1008 | { |
nothing calls this directly
no test coverage detected