| 919 | } |
| 920 | |
| 921 | static 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 | |
| 942 | static rt_err_t pci_probe(rt_device_t dev) |
| 943 | { |
nothing calls this directly
no test coverage detected