From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com [IPv6:2607:f8b0:400e:c00::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3ygml03ZT5zDrMg for ; Tue, 21 Nov 2017 11:32:44 +1100 (AEDT) Received: by mail-pf0-x242.google.com with SMTP id i15so8551523pfa.3 for ; Mon, 20 Nov 2017 16:32:44 -0800 (PST) Date: Mon, 20 Nov 2017 16:32:40 -0800 From: Nicolin Chen To: "Maciej S. Szmigiero" Cc: Timur Tabi , Xiubo Li , alsa-devel@alsa-project.org, linux-kernel , Takashi Iwai , Liam Girdwood , Mark Brown , Fabio Estevam , linuxppc-dev@lists.ozlabs.org Subject: Re: [alsa-devel] [PATCH 1/2] ASoC: fsl_ssi: AC'97 ops need regmap, clock and cleaning up on failure Message-ID: <20171121003239.GC14136@Asurada-Nvidia> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Nov 20, 2017 at 11:14:55PM +0100, Maciej S. Szmigiero wrote: > AC'97 ops (register read / write) need SSI regmap and clock, so they have > to be set after them. > > We also need to set these ops back to NULL if we fail the probe. > > Signed-off-by: Maciej S. Szmigiero Acked-by: Nicolin Chen > --- > sound/soc/fsl/fsl_ssi.c | 18 ++++++++++++------ > 1 file changed, 12 insertions(+), 6 deletions(-) > > diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c > index dad80b4b0cfc..a71bb8391f61 100644 > --- a/sound/soc/fsl/fsl_ssi.c > +++ b/sound/soc/fsl/fsl_ssi.c > @@ -1460,12 +1460,6 @@ static int fsl_ssi_probe(struct platform_device *pdev) > sizeof(fsl_ssi_ac97_dai)); > > fsl_ac97_data = ssi_private; By the way, is there any better way to register the ops for AC97 while we could pass the ssi_private so as to remove the global fsl_ac97_data?