diff options
Diffstat (limited to 'fs/pstore/ram.c')
-rw-r--r-- | fs/pstore/ram.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 2b6ebbca3521..8741cea6253c 100644 --- a/fs/pstore/ram.c +++ b/fs/pstore/ram.c | |||
@@ -376,10 +376,14 @@ static int __devinit ramoops_probe(struct platform_device *pdev) | |||
376 | goto fail_out; | 376 | goto fail_out; |
377 | } | 377 | } |
378 | 378 | ||
379 | pdata->mem_size = rounddown_pow_of_two(pdata->mem_size); | 379 | if (!is_power_of_2(pdata->mem_size)) |
380 | pdata->record_size = rounddown_pow_of_two(pdata->record_size); | 380 | pdata->mem_size = rounddown_pow_of_two(pdata->mem_size); |
381 | pdata->console_size = rounddown_pow_of_two(pdata->console_size); | 381 | if (!is_power_of_2(pdata->record_size)) |
382 | pdata->ftrace_size = rounddown_pow_of_two(pdata->ftrace_size); | 382 | pdata->record_size = rounddown_pow_of_two(pdata->record_size); |
383 | if (!is_power_of_2(pdata->console_size)) | ||
384 | pdata->console_size = rounddown_pow_of_two(pdata->console_size); | ||
385 | if (!is_power_of_2(pdata->ftrace_size)) | ||
386 | pdata->ftrace_size = rounddown_pow_of_two(pdata->ftrace_size); | ||
383 | 387 | ||
384 | cxt->dump_read_cnt = 0; | 388 | cxt->dump_read_cnt = 0; |
385 | cxt->size = pdata->mem_size; | 389 | cxt->size = pdata->mem_size; |