Messages in this thread Patch in this message | | | Date | Sun, 4 May 2008 19:37:40 +0200 | From | Ingo Molnar <> | Subject | [patch] build fix for sound/drivers/pcsp/pcsp.c |
| |
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, };
| |