* [patch] build fix for sound/drivers/pcsp/pcsp.c
@ 2008-05-04 17:37 Ingo Molnar
2008-05-04 18:11 ` Stas Sergeev
0 siblings, 1 reply; 2+ messages in thread
From: Ingo Molnar @ 2008-05-04 17:37 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton, Stas Sergeev, Takashi Iwai
x86.git testing found the following build error in v2.6.26-rc1:
sound/drivers/pcsp/pcsp.c: In function 'pcsp_suspend':
sound/drivers/pcsp/pcsp.c:201: error: implicit declaration of function 'snd_pcm_suspend_all'
with the following config:
http://redhat.com/~mingo/misc/config-Sun_May__4_19_20_01_CEST_2008.bad
the reason is the .suspend callback - which is defined even in the case
of !CONFIG_PM in which case snd_pcm_suspend_all() is not available.
Undefine the method for that case, like other platform drivers do.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
sound/drivers/pcsp/pcsp.c | 4 ++++
1 file changed, 4 insertions(+)
Index: linux/sound/drivers/pcsp/pcsp.c
===================================================================
--- linux.orig/sound/drivers/pcsp/pcsp.c
+++ linux/sound/drivers/pcsp/pcsp.c
@@ -194,6 +194,7 @@ static void pcsp_stop_beep(struct snd_pc
spin_unlock_irq(&chip->substream_lock);
}
+#ifdef CONFIG_PM
static int pcsp_suspend(struct platform_device *dev, pm_message_t state)
{
struct snd_pcsp *chip = platform_get_drvdata(dev);
@@ -201,6 +202,7 @@ static int pcsp_suspend(struct platform_
snd_pcm_suspend_all(chip->pcm);
return 0;
}
+#endif
static void pcsp_shutdown(struct platform_device *dev)
{
@@ -215,7 +217,9 @@ static struct platform_driver pcsp_platf
},
.probe = pcsp_probe,
.remove = __devexit_p(pcsp_remove),
+#ifdef CONFIG_PM
.suspend = pcsp_suspend,
+#endif
.shutdown = pcsp_shutdown,
};
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-04 18:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-04 17:37 [patch] build fix for sound/drivers/pcsp/pcsp.c Ingo Molnar
2008-05-04 18:11 ` Stas Sergeev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox