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

Function pci_match

components/drivers/pci/pci.c:921–940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

919}
920
921static rt_bool_t pci_match(rt_driver_t drv, rt_device_t dev)
922{
923 rt_bool_t match = RT_FALSE;
924 struct rt_pci_driver *pdrv = rt_container_of(drv, struct rt_pci_driver, parent);
925 struct rt_pci_device *pdev = rt_container_of(dev, struct rt_pci_device, parent);
926
927 if (pdrv->name && pdev->name)
928 {
929 match = rt_strcmp(pdrv->name, pdev->name) ? RT_FALSE : RT_TRUE;
930 }
931
932 if (!match)
933 {
934 pdev->id = rt_pci_match_ids(pdev, pdrv->ids);
935
936 match = pdev->id ? RT_TRUE : RT_FALSE;
937 }
938
939 return match;
940}
941
942static rt_err_t pci_probe(rt_device_t dev)
943{

Callers

nothing calls this directly

Calls 2

rt_strcmpFunction · 0.85
rt_pci_match_idsFunction · 0.85

Tested by

no test coverage detected