public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] redue ifdef clutter in arch/ppc64/kernel/idle.c
@ 2004-09-26 12:23 Christoph Hellwig
  0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2004-09-26 12:23 UTC (permalink / raw)
  To: anton; +Cc: linux-kernel


--- 1.26/arch/ppc64/kernel/idle.c	2004-09-22 11:56:16 +02:00
+++ edited/arch/ppc64/kernel/idle.c	2004-09-25 17:20:32 +02:00
@@ -334,20 +334,24 @@
 }
 __initcall(register_powersave_nap_sysctl);
 #endif
+	
+/*
+ * Move that junk to each platform specific file, eventually define
+ * a pSeries_idle for shared processor stuff
+ */
 
-int idle_setup(void)
-{
-	/*
-	 * Move that junk to each platform specific file, eventually define
-	 * a pSeries_idle for shared processor stuff
-	 */
 #ifdef CONFIG_PPC_ISERIES
+static void iseries_idle_setup(void)
+{
 	idle_loop = iSeries_idle;
-	return 1;
+}
 #else
-	idle_loop = default_idle;
+# define iseries_idle_setup()	do { } while (0)
 #endif
+
 #ifdef CONFIG_PPC_PSERIES
+static void pseries_idle_setup(void)
+{
 	if (systemcfg->platform & PLATFORM_PSERIES) {
 		if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
 			if (get_paca()->lppaca.xSharedProc) {
@@ -362,13 +366,30 @@
 			idle_loop = default_idle;
 		}
 	}
-#endif /* CONFIG_PPC_PSERIES */
+}
+#else
+# define pseries_idle_setup()	do { } while (0)
+#endif
+
 #ifdef CONFIG_PPC_PMAC
+static void pmac_idle_setup(void)
+{
 	if (systemcfg->platform == PLATFORM_POWERMAC) {
 		printk(KERN_INFO "Using native/NAP idle loop\n");
 		idle_loop = native_idle;
 	}
-#endif /* CONFIG_PPC_PMAC */
+}
+#else
+# define pmac_idle_setup()	do { } while (0)
+#endif
+
+int idle_setup(void)
+{
+	idle_loop = default_idle;
+
+	iseries_idle_setup();
+	pseries_idle_setup();
+	pmac_idle_setup();
 
 	return 1;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-26 12:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-26 12:23 [PATCH] redue ifdef clutter in arch/ppc64/kernel/idle.c Christoph Hellwig

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