public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* [PATCH 1/2] cleanup calling mmio_nvram_init
@ 2007-12-13 10:11 Ishizaki Kou
  2007-12-13 12:07 ` Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Ishizaki Kou @ 2007-12-13 10:11 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev, arnd

This patch adds conditional initialization for mmio_nvram_init().

Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba•co.jp>
---

Here is the previous discussion:
 http://ozlabs.org/pipermail/linuxppc-dev/2007-December/047435.html


Index: linux-powerpc-git/arch/powerpc/platforms/cell/setup.c
===================================================================
--- linux-powerpc-git.orig/arch/powerpc/platforms/cell/setup.c
+++ linux-powerpc-git/arch/powerpc/platforms/cell/setup.c
@@ -179,9 +179,7 @@ static void __init cell_setup_arch(void)
 	conswitchp = &dummy_con;
 #endif
 
-#ifdef CONFIG_MMIO_NVRAM
 	mmio_nvram_init();
-#endif
 }
 
 static int __init cell_probe(void)
Index: linux-powerpc-git/include/asm-powerpc/nvram.h
===================================================================
--- linux-powerpc-git.orig/include/asm-powerpc/nvram.h
+++ linux-powerpc-git/include/asm-powerpc/nvram.h
@@ -10,6 +10,8 @@
 #ifndef _ASM_POWERPC_NVRAM_H
 #define _ASM_POWERPC_NVRAM_H
 
+#include <linux/errno.h>
+
 #define NVRW_CNT 0x20
 #define NVRAM_HEADER_LEN 16 /* sizeof(struct nvram_header) */
 #define NVRAM_BLOCK_LEN 16
@@ -71,7 +73,16 @@ extern int nvram_clear_error_log(void);
 extern struct nvram_partition *nvram_find_partition(int sig, const char *name);
 
 extern int pSeries_nvram_init(void);
+
+#ifdef CONFIG_MMIO_NVRAM
 extern int mmio_nvram_init(void);
+#else
+static inline int mmio_nvram_init(void)
+{
+	return -ENODEV;
+}
+#endif
+
 #endif /* __KERNEL__ */
 
 /* PowerMac specific nvram stuffs */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] cleanup calling mmio_nvram_init
  2007-12-13 10:11 [PATCH 1/2] cleanup calling mmio_nvram_init Ishizaki Kou
@ 2007-12-13 12:07 ` Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2007-12-13 12:07 UTC (permalink / raw)
  To: Ishizaki Kou; +Cc: linuxppc-dev, paulus

On Thursday 13 December 2007, Ishizaki Kou wrote:
> This patch adds conditional initialization for mmio_nvram_init().

Thanks!

> Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba•co.jp>

Acked-by: Arnd Bergmann <arnd@arndb•de>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-13 12:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-13 10:11 [PATCH 1/2] cleanup calling mmio_nvram_init Ishizaki Kou
2007-12-13 12:07 ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox