Skip to contentSkip to conversation

Always define pmu_sys_suspended

PATCH In review Guido Günther 2 participants 4 messages Feb 27, 2008 – Mar 12, 2008 Linux for power macintosh

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Always define pmu_sys_suspended

In current Linus git pmu_sys_suspended is only defined if CONFIG_SUSPEND is set, so compilation fails with:

drivers/built-in.o: In function `pmu_led_set':
via-pmu-led.c:(.text+0x48622): undefined reference to pmu_sys_suspended' via-pmu-led.c:(.text+0x48626): undefined reference to pmu_sys_suspended' drivers/built-in.o: In function `pmu_req_done':
via-pmu-led.c:(.text+0x48696): undefined reference to pmu_sys_suspended' via-pmu-led.c:(.text+0x4869a): undefined reference to pmu_sys_suspended'
make: *** [.tmp_vmlinux1] Error 1

since via-pmu-led.c uses it unconditionally. Instead of adding more '#ifdef' clutter I moved it out of the #ifdef so it's always available. Need to fix compilation on PPC32 without CONFIG_SUSPEND.

---
 drivers/macintosh/via-pmu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/macintosh/via-pmu.c +1 -1
index ebec663..296edcb 100644
@@ -2437,8 +2437,8 @@ void pmu_blink(int n)
 }
 #endif /* DEBUG_SLEEP */
 
-#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
 int pmu_sys_suspended;
+#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
 
 static int pmu_sys_suspend(struct sys_device *sysdev, pm_message_t state)
 {
Signature · 1 line
1.5.4.2
#1 lore raw

PATCH 1/1 Export pmu_* variables unconditionally

Otherwise without CONFIG_SUSPEND we have:

ERROR: "pmu_batteries" [drivers/macintosh/apm_emu.ko] undefined!
ERROR: "pmu_battery_count" [drivers/macintosh/apm_emu.ko] undefined!
ERROR: "pmu_power_flags" [drivers/macintosh/apm_emu.ko] undefined!

on PPC32. The variables aren't wrapped in '#if defined(CONFIG_SUSPEND)' so we probably shouldn't wrap the exports either. Fixes compilation on ppc32.

---
 drivers/macintosh/via-pmu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/macintosh/via-pmu.c +1 -1
index 296edcb..399fc7f 100644
@@ -2528,7 +2528,7 @@ EXPORT_SYMBOL(pmu_wait_complete);
 EXPORT_SYMBOL(pmu_suspend);
 EXPORT_SYMBOL(pmu_resume);
 EXPORT_SYMBOL(pmu_unlock);
-#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
+#if defined(CONFIG_PPC32)
 EXPORT_SYMBOL(pmu_enable_irled);
 EXPORT_SYMBOL(pmu_battery_count);
 EXPORT_SYMBOL(pmu_batteries);
Signature · 1 line
1.5.4.2
#2 lore raw

PATCH 1/1 Export pmu_* variables unconditionally

In reply to Guido Günther

Hi,
This is a resend, since it's still unfixed in current Linus git and I didn't see any comments (please cc: me since I'm not subscribed):

Otherwise without CONFIG_SUSPEND we have:

ERROR: "pmu_batteries" [drivers/macintosh/apm_emu.ko] undefined!
ERROR: "pmu_battery_count" [drivers/macintosh/apm_emu.ko] undefined!
ERROR: "pmu_power_flags" [drivers/macintosh/apm_emu.ko] undefined!

on PPC32. The variables aren't wrapped in '#if defined(CONFIG_SUSPEND)' so we probably shouldn't wrap the exports either. Fixes compilation on ppc32.

---
 drivers/macintosh/via-pmu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/macintosh/via-pmu.c +1 -1
index 296edcb..399fc7f 100644
@@ -2528,7 +2528,7 @@ EXPORT_SYMBOL(pmu_wait_complete);
 EXPORT_SYMBOL(pmu_suspend);
 EXPORT_SYMBOL(pmu_resume);
 EXPORT_SYMBOL(pmu_unlock);
-#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
+#if defined(CONFIG_PPC32)
 EXPORT_SYMBOL(pmu_enable_irled);
 EXPORT_SYMBOL(pmu_battery_count);
 EXPORT_SYMBOL(pmu_batteries);
Signature · 1 line
1.5.4.2
#3 lore raw
In reply to Guido Günther

drivers/macintosh/via-pmu.=

Quoted 1 line · Guido G=FCnther
drivers/macintosh/via-pmu.= renamed from drivers/macintosh/via-pmu.c +0 -0

c

drivers/macintosh/via-pmu.c

Quoted 10 lines

index ebec663..296edcb 100644

drivers/macintosh/via-pmu.c +0 -0
@@ -2437,8 +2437,8 @@ void pmu=5Fblink(int n)
 }
 #endif /* DEBUG=5FSLEEP */

=20

drivers/macintosh/via-pmu.c +1 -1
-#if defined(CONFIG=5FSUSPEND) && defined(CONFIG=5FPPC32)
 int pmu=5Fsys=5Fsuspended;
+#if defined(CONFIG=5FSUSPEND) && defined(CONFIG=5FPPC32)

I don't think this is quite right, since pmu.h currently defines pmu=5Fsys=5Fsuspended to be 0 if CONFIG=5FPM=5FSLEEP is not defined. T= hus
with your patch we will get a syntax error in that case.

Paul.