diff mbox

[1/3] powerpc/nvram: scan partitions only once

Message ID 1383140828-7481-2-git-send-email-clg@fr.ibm.com (mailing list archive)
State Accepted, archived
Commit 65f36f4149ce4490b2174ef45e1dbe494f4b8268
Headers show

Commit Message

Cédric Le Goater Oct. 30, 2013, 1:47 p.m. UTC
From: Cedric Le Goater <clg@fr.ibm.com>

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>
---
 arch/powerpc/platforms/pseries/nvram.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c
index d276cd3..2498d4d 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
 	loff_t p;
 	int size;
 
-	/* Scan nvram for partitions */
-	nvram_scan_partitions();
-
 	/* Look for ours */
 	p = nvram_find_partition(part->name, NVRAM_SIG_OS, &size);
 
@@ -795,6 +792,9 @@  static int __init pseries_nvram_init_log_partitions(void)
 {
 	int rc;
 
+	/* Scan nvram for partitions */
+	nvram_scan_partitions();
+
 	rc = pseries_nvram_init_os_partition(&rtas_log_partition);
 	nvram_init_oops_partition(rc == 0);
 	return 0;