Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1187429

Re: [PATCH v2 1/2] ASoC: rockchip: Add machine driver for max98090 codec

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/2] ASoC: rockchip: Add machine driver for max98090 codec
Date 2015-07-18 11:20 +0200
Message-ID <pNwrL-8fQ-1@gated-at.bofh.it> (permalink)
References <pNsHv-2VV-3@gated-at.bofh.it> <pNsHw-2VV-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/2] Add codec machine driver for rockchip platform Xing Zheng <zhengxing@rock-chips.com> - 2015-07-18 07:20 +0200
  [PATCH v2 2/2] ASoC: rockchip: Add machine driver for rt5645/rt5650 codec Xing Zheng <zhengxing@rock-chips.com> - 2015-07-18 07:20 +0200
  [PATCH v2 1/2] ASoC: rockchip: Add machine driver for max98090 codec Xing Zheng <zhengxing@rock-chips.com> - 2015-07-18 07:20 +0200
    Re: [PATCH v2 1/2] ASoC: rockchip: Add machine driver for max98090  codec Mark Brown <broonie@kernel.org> - 2015-07-18 11:20 +0200
      Re: [PATCH v2 1/2] ASoC: rockchip: Add machine driver for max98090  codec Xing Zheng <zhengxing@rock-chips.com> - 2015-07-19 09:50 +0200

csiph-web