From: Ingo Molnar <mingo@elte.hu>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Stas Sergeev <stsp@aknet.ru>, Takashi Iwai <tiwai@suse.de>
Subject: [patch] build fix for sound/drivers/pcsp/pcsp.c
Date: Sun, 4 May 2008 19:37:40 +0200 [thread overview]
Message-ID: <20080504173740.GA14170@elte.hu> (raw)
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,
};
next reply other threads:[~2008-05-04 17:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-04 17:37 Ingo Molnar [this message]
2008-05-04 18:11 ` [patch] build fix for sound/drivers/pcsp/pcsp.c Stas Sergeev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080504173740.GA14170@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stsp@aknet.ru \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox