[PATCH] redue ifdef clutter in arch/ppc64/kernel/idle.c

From: Christoph Hellwig
Date: Sun Sep 26 2004 - 07:26:27 EST



--- 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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/