Lines Matching refs:dev_info
233 static void amd8111_lpc_bridge_init(struct amd8111_dev_info *dev_info) in amd8111_lpc_bridge_init() argument
236 struct pci_dev *dev = dev_info->dev; in amd8111_lpc_bridge_init()
270 static void amd8111_lpc_bridge_exit(struct amd8111_dev_info *dev_info) in amd8111_lpc_bridge_exit() argument
278 struct amd8111_dev_info *dev_info = edac_dev->pvt_info; in amd8111_lpc_bridge_check() local
279 struct pci_dev *dev = dev_info->dev; in amd8111_lpc_bridge_check()
286 dev_info->ctl_name); in amd8111_lpc_bridge_check()
339 struct amd8111_dev_info *dev_info = &amd8111_devices[id->driver_data]; in amd8111_dev_probe() local
342 dev_info->dev = pci_get_device(PCI_VENDOR_ID_AMD, in amd8111_dev_probe()
343 dev_info->err_dev, NULL); in amd8111_dev_probe()
345 if (!dev_info->dev) { in amd8111_dev_probe()
348 PCI_VENDOR_ID_AMD, dev_info->err_dev, in amd8111_dev_probe()
349 dev_info->ctl_name); in amd8111_dev_probe()
353 if (pci_enable_device(dev_info->dev)) { in amd8111_dev_probe()
356 PCI_VENDOR_ID_AMD, dev_info->err_dev, in amd8111_dev_probe()
357 dev_info->ctl_name); in amd8111_dev_probe()
366 dev_info->edac_idx = edac_device_alloc_index(); in amd8111_dev_probe()
367 dev_info->edac_dev = in amd8111_dev_probe()
368 edac_device_alloc_ctl_info(0, dev_info->ctl_name, 1, in amd8111_dev_probe()
370 NULL, 0, dev_info->edac_idx); in amd8111_dev_probe()
371 if (!dev_info->edac_dev) { in amd8111_dev_probe()
376 dev_info->edac_dev->pvt_info = dev_info; in amd8111_dev_probe()
377 dev_info->edac_dev->dev = &dev_info->dev->dev; in amd8111_dev_probe()
378 dev_info->edac_dev->mod_name = AMD8111_EDAC_MOD_STR; in amd8111_dev_probe()
379 dev_info->edac_dev->ctl_name = dev_info->ctl_name; in amd8111_dev_probe()
380 dev_info->edac_dev->dev_name = dev_name(&dev_info->dev->dev); in amd8111_dev_probe()
383 dev_info->edac_dev->edac_check = dev_info->check; in amd8111_dev_probe()
385 if (dev_info->init) in amd8111_dev_probe()
386 dev_info->init(dev_info); in amd8111_dev_probe()
388 if (edac_device_add_device(dev_info->edac_dev) > 0) { in amd8111_dev_probe()
390 dev_info->ctl_name); in amd8111_dev_probe()
396 PCI_VENDOR_ID_AMD, dev_info->err_dev, in amd8111_dev_probe()
397 dev_info->ctl_name); in amd8111_dev_probe()
402 edac_device_free_ctl_info(dev_info->edac_dev); in amd8111_dev_probe()
404 pci_dev_put(dev_info->dev); in amd8111_dev_probe()
411 struct amd8111_dev_info *dev_info; in amd8111_dev_remove() local
413 for (dev_info = amd8111_devices; dev_info->err_dev; dev_info++) in amd8111_dev_remove()
414 if (dev_info->dev->device == dev->device) in amd8111_dev_remove()
417 if (!dev_info->err_dev) /* should never happen */ in amd8111_dev_remove()
420 if (dev_info->edac_dev) { in amd8111_dev_remove()
421 edac_device_del_device(dev_info->edac_dev->dev); in amd8111_dev_remove()
422 edac_device_free_ctl_info(dev_info->edac_dev); in amd8111_dev_remove()
425 if (dev_info->exit) in amd8111_dev_remove()
426 dev_info->exit(dev_info); in amd8111_dev_remove()
428 pci_dev_put(dev_info->dev); in amd8111_dev_remove()