From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753367AbdBARBv (ORCPT ); Wed, 1 Feb 2017 12:01:51 -0500 Received: from mx2.suse.de ([195.135.220.15]:53411 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752776AbdBARBr (ORCPT ); Wed, 1 Feb 2017 12:01:47 -0500 Date: Wed, 01 Feb 2017 18:01:44 +0100 Message-ID: From: Takashi Iwai To: "Arnd Bergmann" Cc: "Jaroslav Kysela" , , "Jerome Anand" , "Pierre-Louis Bossart" , "Julia Lawall" , Subject: Re: [PATCH] ALSA: x86: hdmi: fix build with CONFIG_PM=n In-Reply-To: <20170201162030.2176464-1-arnd@arndb.de> References: <20170201162030.2176464-1-arnd@arndb.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.1 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 01 Feb 2017 17:19:47 +0100, Arnd Bergmann wrote: > > 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 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 > --- > 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 > >