mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Jerome Anand <jerome.anand@intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Julia Lawall <julia.lawall@lip6.fr>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ALSA: x86: hdmi: fix build with CONFIG_PM=n
Date: Wed,  1 Feb 2017 17:19:47 +0100	[thread overview]
Message-ID: <20170201162030.2176464-1-arnd@arndb.de> (raw)

The runtime_status field is defined conditionally and must not be accessed outside
of #ifdef CONFIG_PM:

sound/x86/intel_hdmi_audio_if.c: In function 'hdmi_audio_suspend':
sound/x86/intel_hdmi_audio_if.c:112:30: error: 'struct dev_pm_info' has no member named 'runtime_status'
  if (intelhaddata->dev->power.runtime_status != RPM_SUSPENDED) {

pm_runtime_status_suspended() does what we need here.

Fixes: 5dab11d89777 ("ALSA: x86: hdmi: Add audio support for BYT and CHT")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/x86/intel_hdmi_audio_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/x86/intel_hdmi_audio_if.c b/sound/x86/intel_hdmi_audio_if.c
index 9ae242d62eb2..99eecef87e62 100644
--- a/sound/x86/intel_hdmi_audio_if.c
+++ b/sound/x86/intel_hdmi_audio_if.c
@@ -109,7 +109,7 @@ int hdmi_audio_suspend(void *haddata, struct hdmi_audio_event event)
 	had_stream = intelhaddata->private_data;
 	substream = intelhaddata->stream_info.had_substream;
 
-	if (intelhaddata->dev->power.runtime_status != RPM_SUSPENDED) {
+	if (!pm_runtime_status_suspended(intelhaddata->dev)) {
 		pr_err("audio stream is active\n");
 		return -EAGAIN;
 	}
-- 
2.9.0

             reply	other threads:[~2017-02-01 16:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-01 16:19 Arnd Bergmann [this message]
2017-02-01 17:01 ` 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=20170201162030.2176464-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=jerome.anand@intel.com \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.com \
    /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

all inboxes | Powered by JetHome®