| 255 | }; |
| 256 | |
| 257 | void pci_procfs_attach(struct rt_pci_device *pdev) |
| 258 | { |
| 259 | const char *name; |
| 260 | struct proc_dentry *dentry; |
| 261 | |
| 262 | if (!pci_proc_dentry) |
| 263 | { |
| 264 | return; |
| 265 | } |
| 266 | |
| 267 | name = rt_dm_dev_get_name(&pdev->parent); |
| 268 | dentry = proc_create_data(name, 0644, pci_proc_dentry, &pci_fops, pdev); |
| 269 | |
| 270 | if (!dentry) |
| 271 | { |
| 272 | LOG_E("Create %s file fail", name); |
| 273 | return; |
| 274 | } |
| 275 | proc_release(dentry); |
| 276 | } |
| 277 | |
| 278 | void pci_procfs_detach(struct rt_pci_device *pdev) |
| 279 | { |
nothing calls this directly
no test coverage detected