| 940 | } |
| 941 | |
| 942 | static rt_err_t pci_probe(rt_device_t dev) |
| 943 | { |
| 944 | rt_err_t err = RT_EOK; |
| 945 | struct rt_pci_driver *pdrv = rt_container_of(dev->drv, struct rt_pci_driver, parent); |
| 946 | struct rt_pci_device *pdev = rt_container_of(dev, struct rt_pci_device, parent); |
| 947 | |
| 948 | rt_pci_assign_irq(pdev); |
| 949 | rt_pci_enable_wake(pdev, RT_PCI_D0, RT_TRUE); |
| 950 | |
| 951 | err = pdrv->probe(pdev); |
| 952 | |
| 953 | if (err) |
| 954 | { |
| 955 | rt_pci_enable_wake(pdev, RT_PCI_D0, RT_FALSE); |
| 956 | } |
| 957 | |
| 958 | return err; |
| 959 | } |
| 960 | |
| 961 | static rt_err_t pci_remove(rt_device_t dev) |
| 962 | { |
nothing calls this directly
no test coverage detected