summaryrefslogtreecommitdiff
path: root/sound/x86
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-01-31 16:38:22 +0100
committerTakashi Iwai <tiwai@suse.de>2017-02-03 17:34:09 +0100
commitcaa2a61a702a2a391b2fb695fc245ca5b8a4ffd8 (patch)
tree075025a52f934e8d5fb98560d0d30b30f27dbfd4 /sound/x86
parent99b2ab9d3aa08824dfefd7d9ad9f2b4c19555d05 (diff)
ALSA: x86: Remove superfluous check at resume
The had_get_hwstate() is identical with drv_status==DISCONECTED, which was already checked before the call. And, returning an error at resume is simply bad. That is, we should just kill this check. Also, spewing an error at resume for drv_status!=SUSPENDED is also annoying, as this is the normal case when the suspend was called without the monitor connection. Make it debug, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/x86')
-rw-r--r--sound/x86/intel_hdmi_audio.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
index ab199b5deaa5..835e0f2c4f0b 100644
--- a/sound/x86/intel_hdmi_audio.c
+++ b/sound/x86/intel_hdmi_audio.c
@@ -1454,7 +1454,6 @@ static int hdmi_lpe_audio_suspend(struct platform_device *pdev,
return -EAGAIN;
}
-
spin_lock_irqsave(&intelhaddata->had_spinlock, flag_irqs);
if (intelhaddata->drv_status == HAD_DRV_DISCONNECTED) {
spin_unlock_irqrestore(&intelhaddata->had_spinlock, flag_irqs);
@@ -1500,17 +1499,10 @@ static int hdmi_lpe_audio_resume(struct platform_device *pdev)
if (intelhaddata->drv_status != HAD_DRV_SUSPENDED) {
spin_unlock_irqrestore(&intelhaddata->had_spinlock, flag_irqs);
- dev_err(intelhaddata->dev, "had is not in suspended state\n");
+ dev_dbg(intelhaddata->dev, "had is not in suspended state\n");
return 0;
}
- if (had_get_hwstate(intelhaddata)) {
- spin_unlock_irqrestore(&intelhaddata->had_spinlock, flag_irqs);
- dev_err(intelhaddata->dev,
- "Failed to resume. Device not accessible\n");
- return -ENODEV;
- }
-
intelhaddata->drv_status = HAD_DRV_CONNECTED;
dev_dbg(intelhaddata->dev,
"%s @ %d:DEBUG PLUG/UNPLUG : HAD_DRV_DISCONNECTED\n",