Lines Matching refs:dev_info
93 static void amd8131_pcix_init(struct amd8131_dev_info *dev_info) in amd8131_pcix_init() argument
96 struct pci_dev *dev = dev_info->dev; in amd8131_pcix_init()
144 static void amd8131_pcix_exit(struct amd8131_dev_info *dev_info) in amd8131_pcix_exit() argument
147 struct pci_dev *dev = dev_info->dev; in amd8131_pcix_exit()
172 struct amd8131_dev_info *dev_info = edac_dev->pvt_info; in amd8131_pcix_check() local
173 struct pci_dev *dev = dev_info->dev; in amd8131_pcix_check()
180 "on %s bridge\n", dev_info->ctl_name); in amd8131_pcix_check()
200 "on %s bridge\n", dev_info->ctl_name); in amd8131_pcix_check()
213 "on %s bridge\n", dev_info->ctl_name); in amd8131_pcix_check()
226 "on %s bridge\n", dev_info->ctl_name); in amd8131_pcix_check()
251 struct amd8131_dev_info *dev_info; in amd8131_probe() local
253 for (dev_info = amd8131_chipset.devices; dev_info->inst != NO_BRIDGE; in amd8131_probe()
254 dev_info++) in amd8131_probe()
255 if (dev_info->devfn == dev->devfn) in amd8131_probe()
258 if (dev_info->inst == NO_BRIDGE) /* should never happen */ in amd8131_probe()
265 dev_info->dev = pci_dev_get(dev); in amd8131_probe()
267 if (pci_enable_device(dev_info->dev)) { in amd8131_probe()
268 pci_dev_put(dev_info->dev); in amd8131_probe()
272 dev_info->devfn, dev_info->ctl_name); in amd8131_probe()
281 dev_info->edac_idx = edac_pci_alloc_index(); in amd8131_probe()
282 dev_info->edac_dev = edac_pci_alloc_ctl_info(0, dev_info->ctl_name); in amd8131_probe()
283 if (!dev_info->edac_dev) in amd8131_probe()
286 dev_info->edac_dev->pvt_info = dev_info; in amd8131_probe()
287 dev_info->edac_dev->dev = &dev_info->dev->dev; in amd8131_probe()
288 dev_info->edac_dev->mod_name = AMD8131_EDAC_MOD_STR; in amd8131_probe()
289 dev_info->edac_dev->ctl_name = dev_info->ctl_name; in amd8131_probe()
290 dev_info->edac_dev->dev_name = dev_name(&dev_info->dev->dev); in amd8131_probe()
293 dev_info->edac_dev->edac_check = amd8131_chipset.check; in amd8131_probe()
296 amd8131_chipset.init(dev_info); in amd8131_probe()
298 if (edac_pci_add_device(dev_info->edac_dev, dev_info->edac_idx) > 0) { in amd8131_probe()
300 dev_info->ctl_name); in amd8131_probe()
301 edac_pci_free_ctl_info(dev_info->edac_dev); in amd8131_probe()
308 dev_info->devfn, dev_info->ctl_name); in amd8131_probe()
315 struct amd8131_dev_info *dev_info; in amd8131_remove() local
317 for (dev_info = amd8131_chipset.devices; dev_info->inst != NO_BRIDGE; in amd8131_remove()
318 dev_info++) in amd8131_remove()
319 if (dev_info->devfn == dev->devfn) in amd8131_remove()
322 if (dev_info->inst == NO_BRIDGE) /* should never happen */ in amd8131_remove()
325 if (dev_info->edac_dev) { in amd8131_remove()
326 edac_pci_del_device(dev_info->edac_dev->dev); in amd8131_remove()
327 edac_pci_free_ctl_info(dev_info->edac_dev); in amd8131_remove()
331 amd8131_chipset.exit(dev_info); in amd8131_remove()
333 pci_dev_put(dev_info->dev); in amd8131_remove()