[PATCH] pmu_register_sleep_notifier needs ADB_PMU

Olaf Hering olh at suse.de
Sun Oct 23 07:32:06 EST 2005


a simple patch for a pegsos user:
https://bugzilla.novell.com/show_bug.cgi?id=119606

arch/ppc/platforms/built-in.o(.init.text+0x10a4): In function `core99_wake_up':
: undefined reference to `pmu_register_sleep_notifier'
make[1]: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Olaf Hering <olh at suse.de>

 arch/ppc/platforms/pmac_sleep.S |    2 +-
 arch/ppc/platforms/pmac_time.c  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6.14-rc5/arch/ppc/platforms/pmac_sleep.S
===================================================================
--- linux-2.6.14-rc5.orig/arch/ppc/platforms/pmac_sleep.S
+++ linux-2.6.14-rc5/arch/ppc/platforms/pmac_sleep.S
@@ -46,7 +46,7 @@
 	.section .text
 	.align	5
 
-#if defined(CONFIG_PM) || defined(CONFIG_CPU_FREQ_PMAC)
+#if (defined(CONFIG_PM) || defined(CONFIG_CPU_FREQ_PMAC)) && defined(CONFIG_ADB_PMU)
 
 /* This gets called by via-pmu.c late during the sleep process.
  * The PMU was already send the sleep command and will shut us down
Index: linux-2.6.14-rc5/arch/ppc/platforms/pmac_time.c
===================================================================
--- linux-2.6.14-rc5.orig/arch/ppc/platforms/pmac_time.c
+++ linux-2.6.14-rc5/arch/ppc/platforms/pmac_time.c
@@ -206,7 +206,7 @@ via_calibrate_decr(void)
 	return 1;
 }
 
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM) && defined(CONFIG_ADB_PMU)
 /*
  * Reset the time after a sleep.
  */
@@ -251,7 +251,7 @@ pmac_calibrate_decr(void)
 	struct device_node *cpu;
 	unsigned int freq, *fp;
 
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM) && defined(CONFIG_ADB_PMU)
 	pmu_register_sleep_notifier(&time_sleep_notifier);
 #endif /* CONFIG_PM */
 
-- 
short story of a lazy sysadmin:
 alias appserv=wotan



More information about the Linuxppc-dev mailing list