diff options
Diffstat (limited to 'drivers/edac/i82975x_edac.c')
-rw-r--r-- | drivers/edac/i82975x_edac.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/edac/i82975x_edac.c b/drivers/edac/i82975x_edac.c index 069e26c11c4f..a98020409fa9 100644 --- a/drivers/edac/i82975x_edac.c +++ b/drivers/edac/i82975x_edac.c | |||
@@ -370,10 +370,6 @@ static enum dev_type i82975x_dram_type(void __iomem *mch_window, int rank) | |||
370 | static void i82975x_init_csrows(struct mem_ctl_info *mci, | 370 | static void i82975x_init_csrows(struct mem_ctl_info *mci, |
371 | struct pci_dev *pdev, void __iomem *mch_window) | 371 | struct pci_dev *pdev, void __iomem *mch_window) |
372 | { | 372 | { |
373 | static const char *labels[4] = { | ||
374 | "DIMM A1", "DIMM A2", | ||
375 | "DIMM B1", "DIMM B2" | ||
376 | }; | ||
377 | struct csrow_info *csrow; | 373 | struct csrow_info *csrow; |
378 | unsigned long last_cumul_size; | 374 | unsigned long last_cumul_size; |
379 | u8 value; | 375 | u8 value; |
@@ -423,9 +419,10 @@ static void i82975x_init_csrows(struct mem_ctl_info *mci, | |||
423 | dimm = mci->csrows[index]->channels[chan]->dimm; | 419 | dimm = mci->csrows[index]->channels[chan]->dimm; |
424 | 420 | ||
425 | dimm->nr_pages = nr_pages / csrow->nr_channels; | 421 | dimm->nr_pages = nr_pages / csrow->nr_channels; |
426 | strncpy(csrow->channels[chan]->dimm->label, | 422 | |
427 | labels[(index >> 1) + (chan * 2)], | 423 | snprintf(csrow->channels[chan]->dimm->label, EDAC_MC_LABEL_LEN, "DIMM %c%d", |
428 | EDAC_MC_LABEL_LEN); | 424 | (chan == 0) ? 'A' : 'B', |
425 | index); | ||
429 | dimm->grain = 1 << 7; /* 128Byte cache-line resolution */ | 426 | dimm->grain = 1 << 7; /* 128Byte cache-line resolution */ |
430 | dimm->dtype = i82975x_dram_type(mch_window, index); | 427 | dimm->dtype = i82975x_dram_type(mch_window, index); |
431 | dimm->mtype = MEM_DDR2; /* I82975x supports only DDR2 */ | 428 | dimm->mtype = MEM_DDR2; /* I82975x supports only DDR2 */ |