From: Xing Zheng <zhengxing@rock-chips.com>
To: Mark Brown <broonie@kernel.org>
Cc: dgreid@chromium.org, dianders@chromium.org, heiko@sntech.de,
sonnyrao@chromium.org, linux-rockchip@lists.infradead.org,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH v2 1/2] ASoC: rockchip: Add machine driver for max98090 codec
Date: Sun, 19 Jul 2015 15:42:07 +0800 [thread overview]
Message-ID: <55AB54CF.20609@rock-chips.com> (raw)
In-Reply-To: <20150718091608.GW11162@sirena.org.uk>
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.
next prev parent reply other threads:[~2015-07-19 7:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-18 5:08 [PATCH v2 0/2] Add codec machine driver for rockchip platform Xing Zheng
2015-07-18 5:08 ` [PATCH v2 1/2] ASoC: rockchip: Add machine driver for max98090 codec Xing Zheng
2015-07-18 9:16 ` Mark Brown
2015-07-19 7:42 ` Xing Zheng [this message]
2015-07-18 5:08 ` [PATCH v2 2/2] ASoC: rockchip: Add machine driver for rt5645/rt5650 codec Xing Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55AB54CF.20609@rock-chips.com \
--to=zhengxing@rock-chips.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dgreid@chromium.org \
--cc=dianders@chromium.org \
--cc=galak@codeaurora.org \
--cc=heiko@sntech.de \
--cc=ijc+devicetree@hellion.org.uk \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=sonnyrao@chromium.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox