public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Alexander Beregalov <a.beregalov@gmail•com>
To: alsa-devel@alsa-project•org, tiwai@suse•de
Cc: linux-next@vger•kernel.org, Alexander Beregalov <a.beregalov@gmail•com>
Subject: [PATCH] hda_intel: fix build error when !PM
Date: Thu,  4 Jun 2009 13:46:16 +0400	[thread overview]
Message-ID: <1244108776-20937-1-git-send-email-a.beregalov@gmail.com> (raw)

Fix this build error when CONFIG_PM is not set:
ound/pci/hda/hda_intel.c: In function 'azx_bus_reset':
sound/pci/hda/hda_intel.c:1270: error: implicit declaration of function 'snd_pcm_suspend_all'
sound/pci/hda/hda_intel.c:1271: error: implicit declaration of function 'snd_hda_suspend'
sound/pci/hda/hda_intel.c:1272: error: implicit declaration of function 'snd_hda_resume'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail•com>
---
 sound/pci/hda/hda_intel.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 9f44645..4e9ea70 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1260,17 +1260,20 @@ static void azx_stop_chip(struct azx *chip);
 static void azx_bus_reset(struct hda_bus *bus)
 {
 	struct azx *chip = bus->private_data;
-	int i;
 
 	bus->in_reset = 1;
 	azx_stop_chip(chip);
 	azx_init_chip(chip);
+#ifdef CONFIG_PM
 	if (chip->initialized) {
+		int i;
+
 		for (i = 0; i < AZX_MAX_PCMS; i++)
 			snd_pcm_suspend_all(chip->pcm[i]);
 		snd_hda_suspend(chip->bus);
 		snd_hda_resume(chip->bus);
 	}
+#endif
 	bus->in_reset = 0;
 }
 
-- 
1.6.3.1

             reply	other threads:[~2009-06-04 10:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04  9:46 Alexander Beregalov [this message]
2009-06-04 12:22 ` [PATCH] hda_intel: fix build error when !PM Takashi Iwai

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=1244108776-20937-1-git-send-email-a.beregalov@gmail.com \
    --to=a.beregalov@gmail$(echo .)com \
    --cc=alsa-devel@alsa-project$(echo .)org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=tiwai@suse$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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