aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/e7xxx_edac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/e7xxx_edac.c')
-rw-r--r--drivers/edac/e7xxx_edac.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c
index a9518d3e4be4..d601d53b9920 100644
--- a/drivers/edac/e7xxx_edac.c
+++ b/drivers/edac/e7xxx_edac.c
@@ -30,6 +30,8 @@
30#include <linux/slab.h> 30#include <linux/slab.h>
31#include "edac_mc.h" 31#include "edac_mc.h"
32 32
33#define E7XXX_REVISION " Ver: 2.0.0 " __DATE__
34
33#define e7xxx_printk(level, fmt, arg...) \ 35#define e7xxx_printk(level, fmt, arg...) \
34 edac_printk(level, "e7xxx", fmt, ##arg) 36 edac_printk(level, "e7xxx", fmt, ##arg)
35 37
@@ -373,8 +375,8 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
373 EDAC_FLAG_S4ECD4ED; 375 EDAC_FLAG_S4ECD4ED;
374 /* FIXME - what if different memory types are in different csrows? */ 376 /* FIXME - what if different memory types are in different csrows? */
375 mci->mod_name = EDAC_MOD_STR; 377 mci->mod_name = EDAC_MOD_STR;
376 mci->mod_ver = "$Revision: 1.5.2.9 $"; 378 mci->mod_ver = E7XXX_REVISION;
377 mci->pdev = pdev; 379 mci->dev = &pdev->dev;
378 380
379 debugf3("%s(): init pvt\n", __func__); 381 debugf3("%s(): init pvt\n", __func__);
380 pvt = (struct e7xxx_pvt *) mci->pvt_info; 382 pvt = (struct e7xxx_pvt *) mci->pvt_info;
@@ -411,7 +413,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
411 int mem_dev = (dra >> (index * 4 + 3)) & 0x1; 413 int mem_dev = (dra >> (index * 4 + 3)) & 0x1;
412 struct csrow_info *csrow = &mci->csrows[index]; 414 struct csrow_info *csrow = &mci->csrows[index];
413 415
414 pci_read_config_byte(mci->pdev, E7XXX_DRB + index, &value); 416 pci_read_config_byte(pdev, E7XXX_DRB + index, &value);
415 /* convert a 64 or 32 MiB DRB to a page size. */ 417 /* convert a 64 or 32 MiB DRB to a page size. */
416 cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); 418 cumul_size = value << (25 + drc_drbg - PAGE_SHIFT);
417 debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index, 419 debugf3("%s(): (%d) cumul_size 0x%x\n", __func__, index,
@@ -448,11 +450,11 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx)
448 450
449 debugf3("%s(): tolm, remapbase, remaplimit\n", __func__); 451 debugf3("%s(): tolm, remapbase, remaplimit\n", __func__);
450 /* load the top of low memory, remap base, and remap limit vars */ 452 /* load the top of low memory, remap base, and remap limit vars */
451 pci_read_config_word(mci->pdev, E7XXX_TOLM, &pci_data); 453 pci_read_config_word(pdev, E7XXX_TOLM, &pci_data);
452 pvt->tolm = ((u32) pci_data) << 4; 454 pvt->tolm = ((u32) pci_data) << 4;
453 pci_read_config_word(mci->pdev, E7XXX_REMAPBASE, &pci_data); 455 pci_read_config_word(pdev, E7XXX_REMAPBASE, &pci_data);
454 pvt->remapbase = ((u32) pci_data) << 14; 456 pvt->remapbase = ((u32) pci_data) << 14;
455 pci_read_config_word(mci->pdev, E7XXX_REMAPLIMIT, &pci_data); 457 pci_read_config_word(pdev, E7XXX_REMAPLIMIT, &pci_data);
456 pvt->remaplimit = ((u32) pci_data) << 14; 458 pvt->remaplimit = ((u32) pci_data) << 14;
457 e7xxx_printk(KERN_INFO, 459 e7xxx_printk(KERN_INFO,
458 "tolm = %x, remapbase = %x, remaplimit = %x\n", pvt->tolm, 460 "tolm = %x, remapbase = %x, remaplimit = %x\n", pvt->tolm,
@@ -498,7 +500,7 @@ static void __devexit e7xxx_remove_one(struct pci_dev *pdev)
498 500
499 debugf0("%s()\n", __func__); 501 debugf0("%s()\n", __func__);
500 502
501 if ((mci = edac_mc_del_mc(pdev)) == NULL) 503 if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL)
502 return; 504 return;
503 505
504 pvt = (struct e7xxx_pvt *) mci->pvt_info; 506 pvt = (struct e7xxx_pvt *) mci->pvt_info;