diff options
Diffstat (limited to 'drivers/edac/sb_edac.c')
-rw-r--r-- | drivers/edac/sb_edac.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c index 4adaf4b7da99..36ad17e79d61 100644 --- a/drivers/edac/sb_edac.c +++ b/drivers/edac/sb_edac.c | |||
@@ -555,7 +555,7 @@ static int get_dimm_config(struct mem_ctl_info *mci) | |||
555 | pvt->is_close_pg = false; | 555 | pvt->is_close_pg = false; |
556 | } | 556 | } |
557 | 557 | ||
558 | pci_read_config_dword(pvt->pci_ta, RANK_CFG_A, ®); | 558 | pci_read_config_dword(pvt->pci_ddrio, RANK_CFG_A, ®); |
559 | if (IS_RDIMM_ENABLED(reg)) { | 559 | if (IS_RDIMM_ENABLED(reg)) { |
560 | /* FIXME: Can also be LRDIMM */ | 560 | /* FIXME: Can also be LRDIMM */ |
561 | debugf0("Memory is registered\n"); | 561 | debugf0("Memory is registered\n"); |
@@ -1604,8 +1604,6 @@ static void sbridge_unregister_mci(struct sbridge_dev *sbridge_dev) | |||
1604 | debugf0("MC: " __FILE__ ": %s(): mci = %p, dev = %p\n", | 1604 | debugf0("MC: " __FILE__ ": %s(): mci = %p, dev = %p\n", |
1605 | __func__, mci, &sbridge_dev->pdev[0]->dev); | 1605 | __func__, mci, &sbridge_dev->pdev[0]->dev); |
1606 | 1606 | ||
1607 | mce_unregister_decode_chain(&sbridge_mce_dec); | ||
1608 | |||
1609 | /* Remove MC sysfs nodes */ | 1607 | /* Remove MC sysfs nodes */ |
1610 | edac_mc_del_mc(mci->dev); | 1608 | edac_mc_del_mc(mci->dev); |
1611 | 1609 | ||
@@ -1682,7 +1680,6 @@ static int sbridge_register_mci(struct sbridge_dev *sbridge_dev) | |||
1682 | goto fail0; | 1680 | goto fail0; |
1683 | } | 1681 | } |
1684 | 1682 | ||
1685 | mce_register_decode_chain(&sbridge_mce_dec); | ||
1686 | return 0; | 1683 | return 0; |
1687 | 1684 | ||
1688 | fail0: | 1685 | fail0: |
@@ -1811,8 +1808,10 @@ static int __init sbridge_init(void) | |||
1811 | 1808 | ||
1812 | pci_rc = pci_register_driver(&sbridge_driver); | 1809 | pci_rc = pci_register_driver(&sbridge_driver); |
1813 | 1810 | ||
1814 | if (pci_rc >= 0) | 1811 | if (pci_rc >= 0) { |
1812 | mce_register_decode_chain(&sbridge_mce_dec); | ||
1815 | return 0; | 1813 | return 0; |
1814 | } | ||
1816 | 1815 | ||
1817 | sbridge_printk(KERN_ERR, "Failed to register device with error %d.\n", | 1816 | sbridge_printk(KERN_ERR, "Failed to register device with error %d.\n", |
1818 | pci_rc); | 1817 | pci_rc); |
@@ -1828,6 +1827,7 @@ static void __exit sbridge_exit(void) | |||
1828 | { | 1827 | { |
1829 | debugf2("MC: " __FILE__ ": %s()\n", __func__); | 1828 | debugf2("MC: " __FILE__ ": %s()\n", __func__); |
1830 | pci_unregister_driver(&sbridge_driver); | 1829 | pci_unregister_driver(&sbridge_driver); |
1830 | mce_unregister_decode_chain(&sbridge_mce_dec); | ||
1831 | } | 1831 | } |
1832 | 1832 | ||
1833 | module_init(sbridge_init); | 1833 | module_init(sbridge_init); |