From patchwork Wed Jan 18 15:27:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 9524099 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0DC0E60113 for ; Wed, 18 Jan 2017 15:29:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 001F6285F4 for ; Wed, 18 Jan 2017 15:29:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E93AB285F9; Wed, 18 Jan 2017 15:29:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 033C5285F4 for ; Wed, 18 Jan 2017 15:29:05 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7480826669C; Wed, 18 Jan 2017 16:29:04 +0100 (CET) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id EA563266569; Wed, 18 Jan 2017 16:26:45 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1768C266664; Wed, 18 Jan 2017 16:26:37 +0100 (CET) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by alsa0.perex.cz (Postfix) with ESMTP id E8E11266569 for ; Wed, 18 Jan 2017 16:26:34 +0100 (CET) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v0IFEFFC015468; Wed, 18 Jan 2017 09:26:32 -0600 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.wolfsonmicro.com Received: from mail2.cirrus.com (mail1.cirrus.com [141.131.3.20]) by mx0a-001ae601.pphosted.com with ESMTP id 27yj93x9x2-1; Wed, 18 Jan 2017 09:26:32 -0600 Received: from EX17.ad.cirrus.com (unknown [172.20.9.81]) by mail2.cirrus.com (Postfix) with ESMTP id C341E6121ADE; Wed, 18 Jan 2017 09:26:31 -0600 (CST) Received: from imbe.wolfsonmicro.main (198.61.95.81) by EX17.ad.cirrus.com (172.20.9.81) with Microsoft SMTP Server id 14.3.301.0; Wed, 18 Jan 2017 15:26:10 +0000 Received: from algalon.wolfsonmicro.main ([172.22.20.24]) by imbe.wolfsonmicro.main (8.14.4/8.14.4) with ESMTP id v0IFPcBA011222; Wed, 18 Jan 2017 15:25:38 GMT From: Charles Keepax To: Date: Wed, 18 Jan 2017 15:27:05 +0000 Message-ID: <1484753225-24188-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1701180203 Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com, lgirdwood@gmail.com Subject: [alsa-devel] [PATCH] ASoC: arizona: Propagate errors from arizona_spk_init X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP arizona_spk_init uses snd_soc_dapm_new_control which since commit 37e1df8c95e2 ("ASoC: dapm: handle probe deferrals") will occasionally request a probe deferral. Which means we should propagate the error out of our driver from it. Signed-off-by: Charles Keepax --- sound/soc/codecs/cs47l24.c | 5 ++++- sound/soc/codecs/wm5102.c | 5 ++++- sound/soc/codecs/wm5110.c | 5 ++++- sound/soc/codecs/wm8997.c | 6 +++++- sound/soc/codecs/wm8998.c | 6 +++++- 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/cs47l24.c b/sound/soc/codecs/cs47l24.c index 0dd721e..47e6fdd 100644 --- a/sound/soc/codecs/cs47l24.c +++ b/sound/soc/codecs/cs47l24.c @@ -1124,7 +1124,10 @@ static int cs47l24_codec_probe(struct snd_soc_codec *codec) priv->core.arizona->dapm = dapm; - arizona_init_spk(codec); + ret = arizona_init_spk(codec); + if (ret < 0) + return ret; + arizona_init_gpio(codec); arizona_init_mono(codec); arizona_init_notifiers(codec); diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index 9edd239..1fe358e 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c @@ -1946,7 +1946,10 @@ static int wm5102_codec_probe(struct snd_soc_codec *codec) if (ret) goto err_adsp2_codec_probe; - arizona_init_spk(codec); + ret = arizona_init_spk(codec); + if (ret < 0) + return ret; + arizona_init_gpio(codec); arizona_init_notifiers(codec); diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 01b5b6c..1bc9421 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c @@ -2284,7 +2284,10 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec) priv->core.arizona->dapm = dapm; - arizona_init_spk(codec); + ret = arizona_init_spk(codec); + if (ret < 0) + return ret; + arizona_init_gpio(codec); arizona_init_mono(codec); arizona_init_notifiers(codec); diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c index ee0c863..49401a8 100644 --- a/sound/soc/codecs/wm8997.c +++ b/sound/soc/codecs/wm8997.c @@ -1062,8 +1062,12 @@ static int wm8997_codec_probe(struct snd_soc_codec *codec) struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); struct snd_soc_component *component = snd_soc_dapm_to_component(dapm); struct wm8997_priv *priv = snd_soc_codec_get_drvdata(codec); + int ret; + + ret = arizona_init_spk(codec); + if (ret < 0) + return ret; - arizona_init_spk(codec); arizona_init_notifiers(codec); snd_soc_component_disable_pin(component, "HAPTICS"); diff --git a/sound/soc/codecs/wm8998.c b/sound/soc/codecs/wm8998.c index 3694f59..44f4471 100644 --- a/sound/soc/codecs/wm8998.c +++ b/sound/soc/codecs/wm8998.c @@ -1321,10 +1321,14 @@ static int wm8998_codec_probe(struct snd_soc_codec *codec) struct wm8998_priv *priv = snd_soc_codec_get_drvdata(codec); struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); struct snd_soc_component *component = snd_soc_dapm_to_component(dapm); + int ret; priv->core.arizona->dapm = dapm; - arizona_init_spk(codec); + ret = arizona_init_spk(codec); + if (ret < 0) + return ret; + arizona_init_gpio(codec); arizona_init_notifiers(codec);