All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: x86: hdmi: fix build with CONFIG_PM=n
@ 2017-02-01 16:19 ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2017-02-01 16:19 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: Arnd Bergmann, Jerome Anand, Pierre-Louis Bossart, Julia Lawall,
	alsa-devel, linux-kernel

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ALSA: x86: hdmi: fix build with CONFIG_PM=n
@ 2017-02-01 16:19 ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2017-02-01 16:19 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: alsa-devel, Arnd Bergmann, linux-kernel, Pierre-Louis Bossart,
	Julia Lawall, Jerome Anand

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ALSA: x86: hdmi: fix build with CONFIG_PM=n
  2017-02-01 16:19 ` Arnd Bergmann
@ 2017-02-01 17:01   ` Takashi Iwai
  -1 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2017-02-01 17:01 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jaroslav Kysela, alsa-devel, Jerome Anand, Pierre-Louis Bossart,
	Julia Lawall, linux-kernel

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 <arnd@arndb.de>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ALSA: x86: hdmi: fix build with CONFIG_PM=n
@ 2017-02-01 17:01   ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2017-02-01 17:01 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: alsa-devel, Pierre-Louis Bossart, linux-kernel, Julia Lawall,
	Jerome Anand

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 <arnd@arndb.de>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-01 17:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-01 16:19 [PATCH] ALSA: x86: hdmi: fix build with CONFIG_PM=n Arnd Bergmann
2017-02-01 16:19 ` Arnd Bergmann
2017-02-01 17:01 ` Takashi Iwai
2017-02-01 17:01   ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.