[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <55AB54CF.20609@rock-chips.com>
Date: Sun, 19 Jul 2015 15:42:07 +0800
From: Xing Zheng <zhengxing@...k-chips.com>
To: Mark Brown <broonie@...nel.org>
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 2015年07月18日 17:16, Mark Brown wrote:
> 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.
Got it. Thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists