Received: by 10.223.185.116 with SMTP id b49csp6326061wrg; Wed, 28 Feb 2018 07:36:50 -0800 (PST) X-Google-Smtp-Source: AH8x225MHw/y+NzHH7Om5+Ipm/Q5hn/rfpojw447WUr426j2hDFbNJNu9OrHDsTsuKhRWsayVpV9 X-Received: by 10.99.122.12 with SMTP id v12mr14695006pgc.128.1519832210141; Wed, 28 Feb 2018 07:36:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519832210; cv=none; d=google.com; s=arc-20160816; b=lDchakPLIJlAfr3jmKpY/Dm4GRLgJ7FRMA/kK3G1yleFouPiUyZGiFHAdwz4nzv706 bpIdT8tv+IdL9/XR6BYocaxO+CkwJcW5t9h5M4dCyWWjX2QiMtvEi+T5W6Fqo7pZOexi Ora6SXkL0KRnbDjWscAfKbZYK9D2UqvpckNHGkRY0xiQ7ONXL4DARlMpeONVYfz/Xdoz CGEToJD8DWxbpMomw27U8fZdFQu979AXYCXgWGcYe5rFmEBbAGmQRtQB7Z+OymKI8lGc Pyr/qjJXg+g6UyDpSlszvqWiPEny129LM4Z6V7Ic+/N54oOwYaBOcG4fgpPWKH4Ytwp7 vtqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=mzHMqXJ+a75z/meapzEmh0/KO+4/Qpn3XwsRS02Dcv0=; b=n3OYZXkyL35k9dihzZjiROAxNOEqG2xL9FMb6OURe2V0CzzwiEs5MnO7ayrHKnW++P 1IrWqgGGAtc7HvLIVsf2QX1yz4/O3KBmd3vWWYqI3rv1yz0tzBj1l17Pnk/d0IKamuL5 RW/MgJOLA2JXfIPujMmSPmHOyEkodAhyzGvBtvlyl3rbus3urdP4P4lZA01SYu53ep/q dwkgJhQ1H1bbQK35lAVmLHxTeL1TlsQvQuWV5+tvg4DrKR15KMs9XkUIj8m/hBI0IDkA nFe5fVYFD5ff60ponT4HYSh+m6W2Flp2P2IzZTuCRRzgMhcoEGoJ1qdGr+PvuELOT7sA Okvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8si1131234pgs.605.2018.02.28.07.36.35; Wed, 28 Feb 2018 07:36:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933231AbeB1Peu (ORCPT + 99 others); Wed, 28 Feb 2018 10:34:50 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:33296 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752814AbeB1PWg (ORCPT ); Wed, 28 Feb 2018 10:22:36 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Ye-0006Xd-4U; Wed, 28 Feb 2018 15:22:16 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yd-0008N6-8S; Wed, 28 Feb 2018 15:22:15 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Maciej S. Szmigiero" , "Mark Brown" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 014/254] ASoC: fsl_ssi: add AC'97 ops setting check and cleanup In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: "Maciej S. Szmigiero" commit 04143d614f3af84a3f39e79a24a7ca740bd39efd upstream. Check whether setting AC'97 ops succeeded and clean them on removal so the fsl_ssi driver can be reloaded. Signed-off-by: Maciej Szmigiero Signed-off-by: Mark Brown Signed-off-by: Ben Hutchings --- sound/soc/fsl/fsl_ssi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -1274,7 +1274,11 @@ static int fsl_ssi_probe(struct platform fsl_ac97_data = ssi_private; - snd_soc_set_ac97_ops_of_reset(&fsl_ssi_ac97_ops, pdev); + ret = snd_soc_set_ac97_ops_of_reset(&fsl_ssi_ac97_ops, pdev); + if (ret) { + dev_err(&pdev->dev, "could not set AC'97 ops\n"); + return ret; + } } else { /* Initialize this copy of the CPU DAI driver structure */ memcpy(&ssi_private->cpu_dai_drv, &fsl_ssi_dai_template, @@ -1422,6 +1426,9 @@ static int fsl_ssi_remove(struct platfor if (ssi_private->use_dma) irq_dispose_mapping(ssi_private->irq); + if (fsl_ssi_is_ac97(ssi_private)) + snd_soc_set_ac97_ops(NULL); + return 0; }