diff options
Diffstat (limited to 'drivers/edac/edac_mc_sysfs.c')
-rw-r--r-- | drivers/edac/edac_mc_sysfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index cf13bff94f5c..bd46610979c7 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c | |||
@@ -180,6 +180,9 @@ static ssize_t csrow_size_show(struct device *dev, | |||
180 | int i; | 180 | int i; |
181 | u32 nr_pages = 0; | 181 | u32 nr_pages = 0; |
182 | 182 | ||
183 | if (csrow->mci->csbased) | ||
184 | return sprintf(data, "%u\n", PAGES_TO_MiB(csrow->nr_pages)); | ||
185 | |||
183 | for (i = 0; i < csrow->nr_channels; i++) | 186 | for (i = 0; i < csrow->nr_channels; i++) |
184 | nr_pages += csrow->channels[i]->dimm->nr_pages; | 187 | nr_pages += csrow->channels[i]->dimm->nr_pages; |
185 | return sprintf(data, "%u\n", PAGES_TO_MiB(nr_pages)); | 188 | return sprintf(data, "%u\n", PAGES_TO_MiB(nr_pages)); |