From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751895AbdKUAco (ORCPT ); Mon, 20 Nov 2017 19:32:44 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:45581 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751820AbdKUAcm (ORCPT ); Mon, 20 Nov 2017 19:32:42 -0500 X-Google-Smtp-Source: AGs4zMbwloC9BrWEXyKj2CKs2yW7K6SucO6bfQ0KVjbqgCinUBUM2EmFFYK+mWryQlbAjoi1fYZ1gA== 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 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?