include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / edac / i82860_edac.c
index 9fdd76e..b8a95cf 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/pci_ids.h>
-#include <linux/slab.h>
+#include <linux/edac.h>
 #include "edac_core.h"
 
 #define  I82860_REVISION " Ver: 2.0.2 " __DATE__
@@ -57,7 +57,7 @@ static const struct i82860_dev_info i82860_devs[] = {
                .ctl_name = "i82860"},
 };
 
-static struct pci_dev *mci_pdev = NULL;        /* init dev: in case that AGP code
+static struct pci_dev *mci_pdev;       /* init dev: in case that AGP code
                                         * has already registered driver
                                         */
 static struct edac_pci_ctl_info *i82860_pci;
@@ -186,7 +186,7 @@ static int i82860_probe1(struct pci_dev *pdev, int dev_idx)
           the channel and the GRA registers map to physical devices so we are
           going to make 1 channel for group.
         */
-       mci = edac_mc_alloc(0, 16, 1);
+       mci = edac_mc_alloc(0, 16, 1, 0);
 
        if (!mci)
                return -ENOMEM;
@@ -209,7 +209,7 @@ static int i82860_probe1(struct pci_dev *pdev, int dev_idx)
        /* Here we assume that we will never see multiple instances of this
         * type of memory controller.  The ID is therefore hardcoded to 0.
         */
-       if (edac_mc_add_mc(mci, 0)) {
+       if (edac_mc_add_mc(mci)) {
                debugf3("%s(): failed edac_mc_add_mc()\n", __func__);
                goto fail;
        }
@@ -294,6 +294,9 @@ static int __init i82860_init(void)
 
        debugf3("%s()\n", __func__);
 
+       /* Ensure that the OPSTATE is set correctly for POLL or NMI */
+       opstate_init();
+
        if ((pci_rc = pci_register_driver(&i82860_driver)) < 0)
                goto fail0;
 
@@ -345,3 +348,6 @@ MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Red Hat Inc. (http://www.redhat.com) "
                "Ben Woodard <woodard@redhat.com>");
 MODULE_DESCRIPTION("ECC support for Intel 82860 memory hub controllers");
+
+module_param(edac_op_state, int, 0444);
+MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI");