Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2803175imm; Fri, 20 Jul 2018 05:20:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdXq/LLyNTkGv8wVB0d1DvRL2twumXOh4hvvSYavadZuTSzxp4PtCluMHtNxbOCAkat1l8q X-Received: by 2002:a62:d10b:: with SMTP id z11-v6mr1956154pfg.255.1532089209127; Fri, 20 Jul 2018 05:20:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532089209; cv=none; d=google.com; s=arc-20160816; b=YC0+J6yuihGm9GL0bVwuTbwR+MMaUZwDiEGQuoAdimv0JgaRRfi87nT7t4l49vE4Ca 4wlH+47c5xls0mfCm04gEu8ibGUU8fWiSFx1aq2YvA7BHmj0y6T50jA8m30EFl7qTE0z fpj1XTb9civZQ/PSxoNRhL0p4VRbwlFsCgsl3p0lrfxTaYfmX20u83YiJiNLaRdDlSwC CMt+AGrkaFliBU93lruS5BbQiNETRflnml9HFrD1RD2c+h/Bm3nBqV6ZH9VdigsmstY1 ha1n1MDroDHQ3MS2V48tZVAyOj6VuUb4Fs4vn1wNyiQ2VmFhRkLwXe+4ueNUmvgZkrKC vs0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=+bMIVmmSkdUMMRfhGlsAIyjzk3s+tFnAmpoXjLL0vlU=; b=0w2WjmOjy0Tpz7pPdWTj4WuifjJMKUxZmj1iK6aLI3uGwdhnZZ7biOOIsmI+T0xTUh GAqRo6IS5qio/uSJkCqfdmJXNaLtmajZcQXXwfnzzGRCMHie6iM5rIHPkVbPlnMnzBXy 1GfnLsRgBoSlGEcCcmNyjZS6LCwfQz3jbjHwPYRy6IFfC3g0Yax6SZAeajLMc3vvq1Ej uTw5zmfxfUxqRVjjJRD3fDxSQs+YFqxUQ0XaamVBdkQBfEUg51mTzbbBX123y2tcsBcD 4E9W5rULcj9yOVxlcicrvAF77k6K+vOS6TywgpM6eCp62YOYzQUYxJrgI0I0Hs6mMFGm pxIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=MWZ78wJW; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9-v6si1725832pgn.177.2018.07.20.05.19.54; Fri, 20 Jul 2018 05:20:09 -0700 (PDT) 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; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=MWZ78wJW; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730782AbeGTNGi (ORCPT + 99 others); Fri, 20 Jul 2018 09:06:38 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:35864 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728409AbeGTNGi (ORCPT ); Fri, 20 Jul 2018 09:06:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+bMIVmmSkdUMMRfhGlsAIyjzk3s+tFnAmpoXjLL0vlU=; b=MWZ78wJWjIf8Wd2NFh38pUwz0 q2PaYr5z9fAGYLnqp3uolxSq5BbVwiXWgMPQUa8FLiQTbTX+aabUzReJI4K6mr+T8MAz97j0RT1+1 kYXZfnxxu3Xc0KhFTdfKD27kX0Ch0aKVJT3/Hi0IXNADsvzBLsiJicyN5la0gIb32T9JY=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgUMS-0008LS-I6; Fri, 20 Jul 2018 12:18:16 +0000 Received: from broonie by debutante with local (Exim 4.91) (envelope-from ) id 1fgUMS-00065b-3F; Fri, 20 Jul 2018 13:18:16 +0100 Date: Fri, 20 Jul 2018 13:18:16 +0100 From: Mark Brown To: Akshu Agrawal Cc: djkurtz@chromium.org, Alexander.Deucher@amd.com, Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Dylan Reid , "Mukunda, Vijendar" , Kuninori Morimoto , Wei Yongjun , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: Re: [PATCH] ASoC: AMD: Add a fix voltage regulator for DA7219 and ADAU7002 Message-ID: <20180720121816.GD10784@sirena.org.uk> References: <1532068715-2992-1-git-send-email-akshu.agrawal@amd.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BI5RvnYi6R4T2M87" Content-Disposition: inline In-Reply-To: <1532068715-2992-1-git-send-email-akshu.agrawal@amd.com> X-Cookie: This unit... must... survive. User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --BI5RvnYi6R4T2M87 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jul 20, 2018 at 02:38:11PM +0800, Akshu Agrawal wrote: > static int cz_probe(struct platform_device *pdev) > { > int ret; > struct snd_soc_card *card; > struct acp_platform_info *machine; > + static bool regulators_registered; > + > + if (!regulators_registered) { > + ret = platform_device_register(&acp_da7219_regulator); > + if (ret) { > + dev_err(&pdev->dev, "Failed to register regulator: %d\n", > + ret); > + return ret; > + } > + regulators_registered = true; > + } You should be unregistering the regulator in your remove function, not doing this hack here. I'd also expect to see the card made the parent of the device that gets registered. --BI5RvnYi6R4T2M87 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAltR0wcACgkQJNaLcl1U h9AbcAf9Fo9ThI5pEiQ3xKKD0YZk9HfxvxQMV9aGNR2pdVyXzGb4qsIc3Iudax1B h4VIUfmGjPmA62O2Pw5PjSJ+yqb+gn6Rxy6KcXPgZ1b5hBavB0CHAqyD4SGKSZSf Yn1i1HqYYWZ+ag0fYM3CIEKyQAV2vWRbOgWQadWsKj8qBUoVSFE7IvsKVDZtalxv 9hkCekoKBZcaeuby9ovPkIM5x7gMQfORmarUpbv5xzHai+yeNPl5BlGYVV1GyYoi 69F4PMy5PkV60tH4ALBAAYJMOSWdbLIWkoMivl+4yxCiuNEXBPsEifaXm/ZHqymU nw9f8D0WNWeFz60XTZCCrTjcqxMkww== =AQ8P -----END PGP SIGNATURE----- --BI5RvnYi6R4T2M87--