[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150718091608.GW11162@sirena.org.uk>
Date: Sat, 18 Jul 2015 10:16:08 +0100
From: Mark Brown <broonie@...nel.org>
To: Xing Zheng <zhengxing@...k-chips.com>
Cc: dgreid@...omium.org, dianders@...omium.org, heiko@...ech.de,
sonnyrao@...omium.org, linux-rockchip@...ts.infradead.org,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, alsa-devel@...a-project.org
Subject: Re: [PATCH v2 1/2] ASoC: rockchip: Add machine driver for max98090
codec
On Sat, Jul 18, 2015 at 01:08:43PM +0800, Xing Zheng wrote:
> + ret = devm_snd_soc_register_card(&pdev->dev, card);
> + if (ret) {
> + dev_err(&pdev->dev,
> + "Soc register card failed %d\n", ret);
> + return ret;
> + }
> +
> + return ret;
> +}
> +
> +static int snd_rk_mc_remove(struct platform_device *pdev)
> +{
> + struct snd_soc_card *soc_card = platform_get_drvdata(pdev);
> +
> + snd_soc_unregister_card(soc_card);
The point with using devm_snd_soc_register_card() is that you don't need
to manually unregister the card - devm_ ensures that the card is freed.
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists