Skip to contentSkip to conversation

ALSA: x86: hdmi: fix build with CONFIG_PM=n

PATCH In review Arnd Bergmann 2 participants 2 messages Feb 1, 2017 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: x86: hdmi: fix build with CONFIG_PM=n

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")
---
 sound/x86/intel_hdmi_audio_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/x86/intel_hdmi_audio_if.c +1 -1
index 9ae242d62eb2..99eecef87e62 100644
@@ -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;
 	}
Signature · 1 line
2.9.0
#1 lore raw
Quoted 4 lines · Arnd Bergmann

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

Quoted 8 lines

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")

Thanks, I already have a similar fix in my local queue, but it wasn't published yet as it depends on another patchset. Now found in topic/intel-lpe-audio-cleanup branch.

Hopefully the whole patches will be merged in this week.

Takashi

Quoted 21 lines
---
 sound/x86/intel_hdmi_audio_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/x86/intel_hdmi_audio_if.c +1 -1
index 9ae242d62eb2..99eecef87e62 100644
@@ -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;
 	}
Signature · 1 line
2.9.0