edac: move nr_pages to dimm struct
[platform/upstream/kernel-adaptation-pc.git] / drivers / edac / x38_edac.c
index bc7f880..e324799 100644 (file)
@@ -373,10 +373,10 @@ static int x38_probe1(struct pci_dev *pdev, int dev_idx)
                if (nr_pages == 0)
                        continue;
 
-               csrow->nr_pages = nr_pages;
-
                for (j = 0; j < x38_channel_num; j++) {
                        struct dimm_info *dimm = csrow->channels[j].dimm;
+
+                       dimm->nr_pages = nr_pages / x38_channel_num;
                        dimm->grain = nr_pages << PAGE_SHIFT;
                        dimm->mtype = MEM_DDR2;
                        dimm->dtype = DEV_UNKNOWN;