Commit 6ee7dd50 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

i7core_edac: Initialize all priv vars before start polling

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 3cfd0146
...@@ -1941,18 +1941,6 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev, ...@@ -1941,18 +1941,6 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev,
goto fail; goto fail;
} }
/* allocating generic PCI control info */
pvt->i7core_pci = edac_pci_create_generic_ctl(&i7core_dev->pdev[0]->dev,
EDAC_MOD_STR);
if (unlikely(!pvt->i7core_pci)) {
printk(KERN_WARNING
"%s(): Unable to create PCI control\n",
__func__);
printk(KERN_WARNING
"%s(): PCI error report via EDAC not setup\n",
__func__);
}
/* Default error mask is any memory */ /* Default error mask is any memory */
pvt->inject.channel = 0; pvt->inject.channel = 0;
pvt->inject.dimm = -1; pvt->inject.dimm = -1;
...@@ -1965,6 +1953,18 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev, ...@@ -1965,6 +1953,18 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev,
pvt->edac_mce.priv = mci; pvt->edac_mce.priv = mci;
pvt->edac_mce.check_error = i7core_mce_check_error; pvt->edac_mce.check_error = i7core_mce_check_error;
/* allocating generic PCI control info */
pvt->i7core_pci = edac_pci_create_generic_ctl(&i7core_dev->pdev[0]->dev,
EDAC_MOD_STR);
if (unlikely(!pvt->i7core_pci)) {
printk(KERN_WARNING
"%s(): Unable to create PCI control\n",
__func__);
printk(KERN_WARNING
"%s(): PCI error report via EDAC not setup\n",
__func__);
}
rc = edac_mce_register(&pvt->edac_mce); rc = edac_mce_register(&pvt->edac_mce);
if (unlikely(rc < 0)) { if (unlikely(rc < 0)) {
debugf0("MC: " __FILE__ debugf0("MC: " __FILE__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment