Skip to content

Commit 15a59cb

Browse files
committed
ALSA: hda: cs35l41: Don't return -EINVAL from system suspend/resume
The recent commit to support the system suspend for CS35L41 caused a regression on the models with CS35L41_EXT_BOOST_NO_VSPK_SWITC boost type, as the suspend/resume callbacks just return -EINVAL. This is eventually handled as a fatal error and blocks the whole system suspend/resume. For avoiding the problem, this patch corrects the return code from cs35l41_system_suspend() and _resume() to 0, and replace dev_err() with dev_err_once() for stop spamming too much. Fixes: 8867282 ("ALSA: hda: cs35l41: Support System Suspend") Cc: <[email protected]> Link: https://lore.kernel.org/all/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 9c694fb commit 15a59cb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sound/pci/hda/cs35l41_hda.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,8 @@ static int cs35l41_system_suspend(struct device *dev)
598598
dev_dbg(cs35l41->dev, "System Suspend\n");
599599

600600
if (cs35l41->hw_cfg.bst_type == CS35L41_EXT_BOOST_NO_VSPK_SWITCH) {
601-
dev_err(cs35l41->dev, "System Suspend not supported\n");
602-
return -EINVAL;
601+
dev_err_once(cs35l41->dev, "System Suspend not supported\n");
602+
return 0; /* don't block the whole system suspend */
603603
}
604604

605605
ret = pm_runtime_force_suspend(dev);
@@ -624,8 +624,8 @@ static int cs35l41_system_resume(struct device *dev)
624624
dev_dbg(cs35l41->dev, "System Resume\n");
625625

626626
if (cs35l41->hw_cfg.bst_type == CS35L41_EXT_BOOST_NO_VSPK_SWITCH) {
627-
dev_err(cs35l41->dev, "System Resume not supported\n");
628-
return -EINVAL;
627+
dev_err_once(cs35l41->dev, "System Resume not supported\n");
628+
return 0; /* don't block the whole system resume */
629629
}
630630

631631
if (cs35l41->reset_gpio) {

0 commit comments

Comments
 (0)