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

Function pci_probe

components/drivers/pci/pci.c:942–959  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

940}
941
942static 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
961static rt_err_t pci_remove(rt_device_t dev)
962{

Callers

nothing calls this directly

Calls 2

rt_pci_assign_irqFunction · 0.85
rt_pci_enable_wakeFunction · 0.85

Tested by

no test coverage detected