diff options
author | Cedric Le Goater <clg@fr.ibm.com> | 2013-10-30 09:47:06 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-10-30 21:37:26 -0400 |
commit | 65f36f4149ce4490b2174ef45e1dbe494f4b8268 (patch) | |
tree | 10199fc09f12f878040f63a8e093e70a472a9921 /arch/powerpc | |
parent | 50bd6153d1a68354a0a0c8bca1fe949fa8875875 (diff) |
powerpc/nvram: Scan partitions only once
nvram_scan_partitions() is called twice when initializing the "lnx,oops-log"
partition and the "ibm,rtas-log" partition. This fills the partition list
with duplicate entries. This patch moves the partition scan in the init
routine pseries_nvram_init_log_partitions() which is called only once.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/pseries/nvram.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c index d276cd3edd8f..2498d4d801e8 100644 --- a/arch/powerpc/platforms/pseries/nvram.c +++ b/arch/powerpc/platforms/pseries/nvram.c | |||
@@ -429,9 +429,6 @@ static int __init pseries_nvram_init_os_partition(struct nvram_os_partition | |||
429 | loff_t p; | 429 | loff_t p; |
430 | int size; | 430 | int size; |
431 | 431 | ||
432 | /* Scan nvram for partitions */ | ||
433 | nvram_scan_partitions(); | ||
434 | |||
435 | /* Look for ours */ | 432 | /* Look for ours */ |
436 | p = nvram_find_partition(part->name, NVRAM_SIG_OS, &size); | 433 | p = nvram_find_partition(part->name, NVRAM_SIG_OS, &size); |
437 | 434 | ||
@@ -795,6 +792,9 @@ static int __init pseries_nvram_init_log_partitions(void) | |||
795 | { | 792 | { |
796 | int rc; | 793 | int rc; |
797 | 794 | ||
795 | /* Scan nvram for partitions */ | ||
796 | nvram_scan_partitions(); | ||
797 | |||
798 | rc = pseries_nvram_init_os_partition(&rtas_log_partition); | 798 | rc = pseries_nvram_init_os_partition(&rtas_log_partition); |
799 | nvram_init_oops_partition(rc == 0); | 799 | nvram_init_oops_partition(rc == 0); |
800 | return 0; | 800 | return 0; |