]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/edac/i82975x_edac.c
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
[karo-tx-linux.git] / drivers / edac / i82975x_edac.c
index 069e26c11c4f761997bbf2afb6b9bf1bf2d6b039..0c8d4b0eaa32876c1eecc8f83b708242244855a1 100644 (file)
@@ -370,10 +370,6 @@ static enum dev_type i82975x_dram_type(void __iomem *mch_window, int rank)
 static void i82975x_init_csrows(struct mem_ctl_info *mci,
                struct pci_dev *pdev, void __iomem *mch_window)
 {
-       static const char *labels[4] = {
-                                                       "DIMM A1", "DIMM A2",
-                                                       "DIMM B1", "DIMM B2"
-                                               };
        struct csrow_info *csrow;
        unsigned long last_cumul_size;
        u8 value;
@@ -423,9 +419,10 @@ static void i82975x_init_csrows(struct mem_ctl_info *mci,
                        dimm = mci->csrows[index]->channels[chan]->dimm;
 
                        dimm->nr_pages = nr_pages / csrow->nr_channels;
-                       strncpy(csrow->channels[chan]->dimm->label,
-                                       labels[(index >> 1) + (chan * 2)],
-                                       EDAC_MC_LABEL_LEN);
+
+                       snprintf(csrow->channels[chan]->dimm->label, EDAC_MC_LABEL_LEN, "DIMM %c%d",
+                                (chan == 0) ? 'A' : 'B',
+                                index);
                        dimm->grain = 1 << 7;   /* 128Byte cache-line resolution */
                        dimm->dtype = i82975x_dram_type(mch_window, index);
                        dimm->mtype = MEM_DDR2; /* I82975x supports only DDR2 */
@@ -595,8 +592,8 @@ fail0:
 }
 
 /* returns count (>= 0), or negative on error */
-static int __devinit i82975x_init_one(struct pci_dev *pdev,
-               const struct pci_device_id *ent)
+static int i82975x_init_one(struct pci_dev *pdev,
+                           const struct pci_device_id *ent)
 {
        int rc;
 
@@ -613,7 +610,7 @@ static int __devinit i82975x_init_one(struct pci_dev *pdev,
        return rc;
 }
 
-static void __devexit i82975x_remove_one(struct pci_dev *pdev)
+static void i82975x_remove_one(struct pci_dev *pdev)
 {
        struct mem_ctl_info *mci;
        struct i82975x_pvt *pvt;
@@ -646,7 +643,7 @@ MODULE_DEVICE_TABLE(pci, i82975x_pci_tbl);
 static struct pci_driver i82975x_driver = {
        .name = EDAC_MOD_STR,
        .probe = i82975x_init_one,
-       .remove = __devexit_p(i82975x_remove_one),
+       .remove = i82975x_remove_one,
        .id_table = i82975x_pci_tbl,
 };