Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp634153ybz; Fri, 17 Apr 2020 07:25:24 -0700 (PDT) X-Google-Smtp-Source: APiQypI6lqEZ+8WeX4doRAZr8DX2WwreRilhL9u+B4KkXhHkHIVHIK3oxSs1budval3DgDhBBr6z X-Received: by 2002:a17:906:4eda:: with SMTP id i26mr3311145ejv.180.1587133524111; Fri, 17 Apr 2020 07:25:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587133524; cv=none; d=google.com; s=arc-20160816; b=vfFtZCsRL1gkr43Ttv8IwXvkfHDSYKUjAR6FyRvutfmki+T25hsHX3p0MNLclwmjia 0vbQpPfYMSorwPtqjn7P/ihyfWIVkGHyDh99r3CN0VYcNYoPn7bSFArZ/rnXTa/gB6i1 AkBBwLJV+8GkpLe0xKM1y5I74lHWmXbEX/bbkXtNhAYeyUPMaFQNC+oS1s8khpCIbo3I EV18P8ynptJTY/AyBiQO69uoAw+CskodRinctkxBt0UG6LqkTl5VstTwCdA5f05tV+T/ AieAvHaC4Z9mnVv1ZlYxwzOuwk6azc3eCyd+wW1hgUEf22fCMbEsj34uYNkm8QAY1xAF 7U0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=1N4ow54NPmupUQR/g8Mm19WWT06UoLJJN1BbF2J/gJE=; b=kcAkPc09U8YWV3RRz0PPcVzQTM4mz2woWPPcuDLAFGBW+KVW03H9g0iZUtDzN9xKqI DbSkxgXzmX/DQ1XuShH2vEDn2X7JQLzwrT0BiUXPHzNdE5yUjjZK88DqRNeTg318uzyo xAtprOcm6n4JAlSmWEPQRrgQ4UaHj4E8+TGpEL1pcz4YmNu5t+0zXa+fqs7pT2VYLnEb HT79pftgT+zGhad73xim9WANWlzdvV4w39BWVF32J5YpqaV8hmqf21xc9YK6iYBYZJlf IBF3W0DEbFX5NqF1am/8PQLlQw096OIrQZpWb8w5IvwHcCFK0gMRlJ3N6ZMBFRjf69jG NP7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=mpgY49qi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g23si14474991ejh.437.2020.04.17.07.25.00; Fri, 17 Apr 2020 07:25:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=mpgY49qi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726446AbgDQOXf (ORCPT + 99 others); Fri, 17 Apr 2020 10:23:35 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:15764 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725272AbgDQOXf (ORCPT ); Fri, 17 Apr 2020 10:23:35 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03HELjsg018688; Fri, 17 Apr 2020 16:22:29 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=1N4ow54NPmupUQR/g8Mm19WWT06UoLJJN1BbF2J/gJE=; b=mpgY49qihD/pmvYqgPzolURf1kuNsS1fs+JsiqEsi15JOR3j0uBqpTxW5mJiUIMQvgjD XSNY1fAEb08ojxakT8BwmP/Rxvg0uDDtm0eQt7m5z1eF9nU01qItWNer41sNqpjiqqfD j5P34Qq5ImYaVCVxOO/LswVoX4ipSpF/igpkbwRVpeLKj9mp3dJ1UeES6gTU5tBhY6T7 1HwCIviGcyiL7/+HXTFQmqGxZsPDSeONpzvkVs3ISZ2pBuSXbbgxw8xoFQ0o9l88rKIH kE3WQTMIPjbFl+Ha5ZFfmzkxtR44rM81k9Pff5szWBjf4batrUn6i1eAnj2pSThrVhOY Mg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 30dn8s9yhu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Apr 2020 16:22:29 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4F565100038; Fri, 17 Apr 2020 16:22:27 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag6node2.st.com [10.75.127.17]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id DFA832BC7B8; Fri, 17 Apr 2020 16:22:27 +0200 (CEST) Received: from localhost (10.75.127.45) by SFHDAG6NODE2.st.com (10.75.127.17) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 17 Apr 2020 16:22:26 +0200 From: Olivier Moysan To: , , , , , CC: , , , Subject: [PATCH] ASoC: stm32: sai: fix sai probe Date: Fri, 17 Apr 2020 16:21:22 +0200 Message-ID: <20200417142122.10212-1-olivier.moysan@st.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG2NODE2.st.com (10.75.127.5) To SFHDAG6NODE2.st.com (10.75.127.17) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-17_06:2020-04-17,2020-04-17 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pcm config must be set before snd_dmaengine_pcm_register() call. Fixes: 0d6defc7e0e4 ("ASoC: stm32: sai: manage rebind issue") Signed-off-by: Olivier Moysan --- sound/soc/stm/stm32_sai_sub.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c index 34a7c3d6fb91..41f01c3e639e 100644 --- a/sound/soc/stm/stm32_sai_sub.c +++ b/sound/soc/stm/stm32_sai_sub.c @@ -1547,6 +1547,9 @@ static int stm32_sai_sub_probe(struct platform_device *pdev) return ret; } + if (STM_SAI_PROTOCOL_IS_SPDIF(sai)) + conf = &stm32_sai_pcm_config_spdif; + ret = snd_dmaengine_pcm_register(&pdev->dev, conf, 0); if (ret) { if (ret != -EPROBE_DEFER) @@ -1556,15 +1559,10 @@ static int stm32_sai_sub_probe(struct platform_device *pdev) ret = snd_soc_register_component(&pdev->dev, &stm32_component, &sai->cpu_dai_drv, 1); - if (ret) { + if (ret) snd_dmaengine_pcm_unregister(&pdev->dev); - return ret; - } - - if (STM_SAI_PROTOCOL_IS_SPDIF(sai)) - conf = &stm32_sai_pcm_config_spdif; - return 0; + return ret; } static int stm32_sai_sub_remove(struct platform_device *pdev) -- 2.17.1