]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/edac/r82600_edac.c
[PATCH] EDAC: reorder EXPORT_SYMBOL macros
[linux-2.6-omap-h63xx.git] / drivers / edac / r82600_edac.c
index ac1359828e78191d52ab107981f8159a23e88dcd..5966916d02bd087be402991e721c3a91ec774f66 100644 (file)
@@ -219,7 +219,7 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx)
        u32 scrub_disabled;
        u32 sdram_refresh_rate;
        u32 row_high_limit_last = 0;
-       u32 eap_init_bits;
+       struct r82600_error_info discard;
 
        debugf0("%s()\n", __func__);
 
@@ -311,8 +311,7 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx)
                row_high_limit_last = row_high_limit;
        }
 
-       /* clear counters */
-       /* FIXME should we? */
+       r82600_get_error_info(mci, &discard);  /* clear counters */
 
        if (edac_mc_add_mc(mci)) {
                debugf3("%s(): failed edac_mc_add_mc()\n", __func__);
@@ -321,19 +320,12 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx)
 
        /* get this far and it's successful */
 
-       /* Clear error flags to allow next error to be reported [p.62] */
-       /* Test systems seem to always have the UE flag raised on boot */
-
-       eap_init_bits = BIT(0) & BIT(1);
        if (disable_hardware_scrub) {
-               eap_init_bits |= BIT(31);
                debugf3("%s(): Disabling Hardware Scrub (scrub on error)\n",
                        __func__);
+               pci_write_bits32(mci->pdev, R82600_EAP, BIT(31), BIT(31));
        }
 
-       pci_write_bits32(mci->pdev, R82600_EAP, eap_init_bits,
-                        eap_init_bits);
-
        debugf3("%s(): success\n", __func__);
        return 0;
 
@@ -361,9 +353,10 @@ static void __devexit r82600_remove_one(struct pci_dev *pdev)
 
        debugf0("%s()\n", __func__);
 
-       if (((mci = edac_mc_find_mci_by_pdev(pdev)) != NULL) &&
-           !edac_mc_del_mc(mci))
-               edac_mc_free(mci);
+       if ((mci = edac_mc_del_mc(pdev)) == NULL)
+               return;
+
+       edac_mc_free(mci);
 }