diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/nvram_64.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c index f7538820c03d..02737e687559 100644 --- a/arch/powerpc/kernel/nvram_64.c +++ b/arch/powerpc/kernel/nvram_64.c | |||
@@ -320,7 +320,7 @@ static int __init nvram_create_partition(const char *name, int sig, | |||
320 | struct nvram_partition *part; | 320 | struct nvram_partition *part; |
321 | struct nvram_partition *new_part; | 321 | struct nvram_partition *new_part; |
322 | struct nvram_partition *free_part = NULL; | 322 | struct nvram_partition *free_part = NULL; |
323 | int seq_init[2] = { 0, 0 }; | 323 | static char nv_init_vals[16]; |
324 | loff_t tmp_index; | 324 | loff_t tmp_index; |
325 | long size = 0; | 325 | long size = 0; |
326 | int rc; | 326 | int rc; |
@@ -379,14 +379,15 @@ static int __init nvram_create_partition(const char *name, int sig, | |||
379 | return rc; | 379 | return rc; |
380 | } | 380 | } |
381 | 381 | ||
382 | /* make sure and initialize to zero the sequence number and the error | 382 | /* Clear the partition */ |
383 | type logged */ | 383 | for (tmp_index = new_part->index + NVRAM_HEADER_LEN; |
384 | tmp_index = new_part->index + NVRAM_HEADER_LEN; | 384 | tmp_index < ((size - 1) * NVRAM_BLOCK_LEN); |
385 | rc = ppc_md.nvram_write((char *)&seq_init, sizeof(seq_init), &tmp_index); | 385 | tmp_index += NVRAM_BLOCK_LEN) { |
386 | if (rc <= 0) { | 386 | rc = ppc_md.nvram_write(nv_init_vals, NVRAM_BLOCK_LEN, &tmp_index); |
387 | printk(KERN_ERR "nvram_create_os_partition: nvram_write " | 387 | if (rc <= 0) { |
388 | "failed (%d)\n", rc); | 388 | pr_err("nvram_create_partition: nvram_write failed (%d)\n", rc); |
389 | return rc; | 389 | return rc; |
390 | } | ||
390 | } | 391 | } |
391 | 392 | ||
392 | nvram_error_log_index = new_part->index + NVRAM_HEADER_LEN; | 393 | nvram_error_log_index = new_part->index + NVRAM_HEADER_LEN; |