* [PATCH 3/4] Fix drivers/macintosh/mediabay.c when !CONFIG_ADB_PMU.
2008-03-11 23:48 [PATCH 1/4] Ensure that pmu_sys_suspended exists in appropriate configs Tony Breeds
@ 2008-03-11 23:48 ` Tony Breeds
2008-03-11 23:48 ` [PATCH 2/4] Fix build of modular drivers/macintosh/apm_emu.c Tony Breeds
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Tony Breeds @ 2008-03-11 23:48 UTC (permalink / raw)
To: Paul Mackerras, linuxppc-dev
When building drivers/macintosh/mediabay.c if CONFIG_ADB_PMU isn't defined we
get:
drivers/built-in.o: In function `media_bay_step':
mediabay.c:(.text+0x92b84): undefined reference to `pmu_suspend'
mediabay.c:(.text+0x92c08): undefined reference to `pmu_resume'
Create empty place holders in that scenario.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
include/linux/pmu.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/include/linux/pmu.h b/include/linux/pmu.h
index b02b57c..cafe98d 100644
--- a/include/linux/pmu.h
+++ b/include/linux/pmu.h
@@ -147,8 +147,15 @@ extern void pmu_wait_complete(struct adb_request *req);
/* For use before switching interrupts off for a long time;
* warning: not stackable
*/
+#if defined(CONFIG_ADB_PMU)
extern void pmu_suspend(void);
extern void pmu_resume(void);
+#else
+static inline void pmu_suspend(void)
+{}
+static inline void pmu_resume(void)
+{}
+#endif
extern void pmu_enable_irled(int on);
--
1.5.4.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/4] Fix build of modular drivers/macintosh/apm_emu.c
2008-03-11 23:48 [PATCH 1/4] Ensure that pmu_sys_suspended exists in appropriate configs Tony Breeds
2008-03-11 23:48 ` [PATCH 3/4] Fix drivers/macintosh/mediabay.c when !CONFIG_ADB_PMU Tony Breeds
@ 2008-03-11 23:48 ` Tony Breeds
2008-03-11 23:48 ` [PATCH 4/4] Fix arch/powerpc/platforms/powermac/pic.c when !CONFIG_ADB_PMU Tony Breeds
2008-03-12 8:38 ` [PATCH 1/4] Ensure that pmu_sys_suspended exists in appropriate configs Guido Günther
3 siblings, 0 replies; 7+ messages in thread
From: Tony Breeds @ 2008-03-11 23:48 UTC (permalink / raw)
To: Paul Mackerras, linuxppc-dev
apm_emu.c needs access to pmu_batteries[] and friends. If CONFIG_SUSPEND isn't
defined these symbols aren't exported and the build fails with:
Building modules, stage 2.
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!
Fix that.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
drivers/macintosh/via-pmu.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index ebec663..0170f55 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -2528,10 +2528,10 @@ 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);
EXPORT_SYMBOL(pmu_power_flags);
-#endif /* CONFIG_SUSPEND && CONFIG_PPC32 */
+#endif /* CONFIG_PPC32 */
--
1.5.4.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 1/4] Ensure that pmu_sys_suspended exists in appropriate configs.
@ 2008-03-11 23:48 Tony Breeds
2008-03-11 23:48 ` [PATCH 3/4] Fix drivers/macintosh/mediabay.c when !CONFIG_ADB_PMU Tony Breeds
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Tony Breeds @ 2008-03-11 23:48 UTC (permalink / raw)
To: Paul Mackerras, linuxppc-dev; +Cc: Guido Guenther
pmu_sys_suspended is declared extern when:
defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
but only defined when:
defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
which is wrong. Lets fix that.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
include/linux/pmu.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/pmu.h b/include/linux/pmu.h
index 4c5f653..b02b57c 100644
--- a/include/linux/pmu.h
+++ b/include/linux/pmu.h
@@ -192,7 +192,7 @@ extern unsigned int pmu_power_flags;
extern void pmu_backlight_init(void);
/* some code needs to know if the PMU was suspended for hibernation */
-#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
+#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
extern int pmu_sys_suspended;
#else
/* if power management is not configured it can't be suspended */
--
1.5.4.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/4] Fix arch/powerpc/platforms/powermac/pic.c when !CONFIG_ADB_PMU.
2008-03-11 23:48 [PATCH 1/4] Ensure that pmu_sys_suspended exists in appropriate configs Tony Breeds
2008-03-11 23:48 ` [PATCH 3/4] Fix drivers/macintosh/mediabay.c when !CONFIG_ADB_PMU Tony Breeds
2008-03-11 23:48 ` [PATCH 2/4] Fix build of modular drivers/macintosh/apm_emu.c Tony Breeds
@ 2008-03-11 23:48 ` Tony Breeds
2008-03-12 8:38 ` [PATCH 1/4] Ensure that pmu_sys_suspended exists in appropriate configs Guido Günther
3 siblings, 0 replies; 7+ messages in thread
From: Tony Breeds @ 2008-03-11 23:48 UTC (permalink / raw)
To: Paul Mackerras, linuxppc-dev
When building arch/powerpc/platforms/powermac/pic.c when !CONFIG_ADB_PMU
we get the following warnings:
arch/powerpc/platforms/powermac/pic.c: In function 'pmacpic_find_viaint':
arch/powerpc/platforms/powermac/pic.c:623: warning: label 'not_found' defined but not used
Fix that.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
arch/powerpc/platforms/powermac/pic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 4073640..829b8b0 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -618,9 +618,9 @@ static int pmacpic_find_viaint(void)
if (np == NULL)
goto not_found;
viaint = irq_of_parse_and_map(np, 0);;
-#endif /* CONFIG_ADB_PMU */
not_found:
+#endif /* CONFIG_ADB_PMU */
return viaint;
}
--
1.5.4.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/4] Ensure that pmu_sys_suspended exists in appropriate configs.
2008-03-11 23:48 [PATCH 1/4] Ensure that pmu_sys_suspended exists in appropriate configs Tony Breeds
` (2 preceding siblings ...)
2008-03-11 23:48 ` [PATCH 4/4] Fix arch/powerpc/platforms/powermac/pic.c when !CONFIG_ADB_PMU Tony Breeds
@ 2008-03-12 8:38 ` Guido Günther
2008-03-12 21:20 ` Tony Breeds
3 siblings, 1 reply; 7+ messages in thread
From: Guido Günther @ 2008-03-12 8:38 UTC (permalink / raw)
To: Tony Breeds; +Cc: linuxppc-dev, Paul Mackerras
Hi Tony,
On Wed, Mar 12, 2008 at 10:48:48AM +1100, Tony Breeds wrote:
> pmu_sys_suspended is declared extern when:
> defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
> but only defined when:
> defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
> which is wrong. Lets fix that.
As I wrote, this isn't defined in my config:
# CONFIG_SUSPEND is not set
CONFIG_HIBERNATION=y
Cheers,
-- Guido
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/4] Ensure that pmu_sys_suspended exists in appropriate configs.
2008-03-12 8:38 ` [PATCH 1/4] Ensure that pmu_sys_suspended exists in appropriate configs Guido Günther
@ 2008-03-12 21:20 ` Tony Breeds
2008-03-13 8:30 ` Guido Günther
0 siblings, 1 reply; 7+ messages in thread
From: Tony Breeds @ 2008-03-12 21:20 UTC (permalink / raw)
To: Guido Günther; +Cc: linuxppc-dev, Paul Mackerras
On Wed, Mar 12, 2008 at 09:38:57AM +0100, Guido Günther wrote:
> Hi Tony,
> On Wed, Mar 12, 2008 at 10:48:48AM +1100, Tony Breeds wrote:
> > pmu_sys_suspended is declared extern when:
> > defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
> > but only defined when:
> > defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32)
> > which is wrong. Lets fix that.
> As I wrote, this isn't defined in my config:
>
> # CONFIG_SUSPEND is not set
> CONFIG_HIBERNATION=y
Hmm okay I thought I tested
for you.
I don't know if I missed it in one of your original posts, can you
supply your .config and compiler error. I can't see anywhere outside
of:
$ git grep -E -l pmu_sys_suspended --
drivers/macintosh/via-pmu-led.c
drivers/macintosh/via-pmu.c
include/linux/pmu.h
where pmu_sys_suspended is referenced and I'm having difficulty
understanding how CONFIG_HIBERNATION is affecting that.
Yours Tony
linux.conf.au http://www.marchsouth.org/
Jan 19 - 24 2009 The Australian Linux Technical Conference!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/4] Ensure that pmu_sys_suspended exists in appropriate configs.
2008-03-12 21:20 ` Tony Breeds
@ 2008-03-13 8:30 ` Guido Günther
0 siblings, 0 replies; 7+ messages in thread
From: Guido Günther @ 2008-03-13 8:30 UTC (permalink / raw)
To: Tony Breeds; +Cc: linuxppc-dev, Paul Mackerras
Hi Tony,
On Thu, Mar 13, 2008 at 08:20:05AM +1100, Tony Breeds wrote:
[..snip..]
> where pmu_sys_suspended is referenced and I'm having difficulty
> understanding how CONFIG_HIBERNATION is affecting that.
I mangled the filenames and didn't notice that you fixed the header file
instead of via-pmu.c. Yes, this should work. Thanks for fixing this
and the apm-emu stuff as well.
Cheers,
-- Guido
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-03-13 8:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-11 23:48 [PATCH 1/4] Ensure that pmu_sys_suspended exists in appropriate configs Tony Breeds
2008-03-11 23:48 ` [PATCH 3/4] Fix drivers/macintosh/mediabay.c when !CONFIG_ADB_PMU Tony Breeds
2008-03-11 23:48 ` [PATCH 2/4] Fix build of modular drivers/macintosh/apm_emu.c Tony Breeds
2008-03-11 23:48 ` [PATCH 4/4] Fix arch/powerpc/platforms/powermac/pic.c when !CONFIG_ADB_PMU Tony Breeds
2008-03-12 8:38 ` [PATCH 1/4] Ensure that pmu_sys_suspended exists in appropriate configs Guido Günther
2008-03-12 21:20 ` Tony Breeds
2008-03-13 8:30 ` Guido Günther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).