aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-07-17 10:09:23 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-07-17 10:09:23 -0400
commitf257b06322c8a30c050a286c45fda68f23b9bc44 (patch)
tree06b9610f5e03e04671ff4568392efacb6869e0d0 /drivers
parent5a651c93d3a823af63b1b15bb94fdc951670fb2f (diff)
[S390] xpram module parameter parsing - take 2.
Don't use memparse since the default size modifier is 'k'. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/block/xpram.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c
index 4cd879cb9bdd..1140302ff11d 100644
--- a/drivers/s390/block/xpram.c
+++ b/drivers/s390/block/xpram.c
@@ -304,6 +304,7 @@ static int __init xpram_setup_sizes(unsigned long pages)
304{ 304{
305 unsigned long mem_needed; 305 unsigned long mem_needed;
306 unsigned long mem_auto; 306 unsigned long mem_auto;
307 unsigned long long size;
307 int mem_auto_no; 308 int mem_auto_no;
308 int i; 309 int i;
309 310
@@ -321,9 +322,19 @@ static int __init xpram_setup_sizes(unsigned long pages)
321 mem_needed = 0; 322 mem_needed = 0;
322 mem_auto_no = 0; 323 mem_auto_no = 0;
323 for (i = 0; i < xpram_devs; i++) { 324 for (i = 0; i < xpram_devs; i++) {
324 if (sizes[i]) 325 if (sizes[i]) {
325 xpram_sizes[i] = 326 size = simple_strtoull(sizes[i], &sizes[i], 0);
326 (memparse(sizes[i], &sizes[i]) + 3) & -4UL; 327 switch (sizes[i][0]) {
328 case 'g':
329 case 'G':
330 size <<= 20;
331 break;
332 case 'm':
333 case 'M':
334 size <<= 10;
335 }
336 xpram_sizes[i] = (size + 3) & -4UL;
337 }
327 if (xpram_sizes[i]) 338 if (xpram_sizes[i])
328 mem_needed += xpram_sizes[i]; 339 mem_needed += xpram_sizes[i];
329 else 340 else