lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 18 Jul 2015 11:51:24 +0800
From:	zhengxing <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,
	Liam Girdwood <lgirdwood@...il.com>,
	Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>,
	linux-kernel@...r.kernel.org, alsa-devel@...a-project.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 1/2] ASoC: rockchip: Add machine driver for max98090 codec

On 2015年07月18日 02:04, Mark Brown wrote:
> On Wed, Jul 15, 2015 at 11:15:42AM +0800, Xing Zheng wrote:
>
> This looks pretty good, a couple of minor points below which should be
> quick to fix.
>
>> +static int rk_init(struct snd_soc_pcm_runtime *runtime)
>> +{
>> +	struct snd_soc_card *card = runtime->card;
>> +
>> +	card->dapm.idle_bias_off = true;
> You shouldn't need to do this?  If you do need to do it we should make
> it possible to do it from the card struct.
Done, we don't need it in the machine driver.
>> +	ret = snd_soc_register_card(card);
>> +	if (ret) {
>> +		pr_err("snd_soc_register_card failed %d\n", ret);
>> +		return ret;
>> +	}
>> +
>> +	ret = snd_soc_of_parse_card_name(card, "rockchip,model");
>> +	if (ret)
>> +		return ret;
> This should be devm_snd_soc_register_card() and you need to parse the
> card name before registering it, otherwise the card might instantiate
> before the name is set.
Done.
>> +static int snd_rk_mc_remove(struct platform_device *pdev)
>> +{
>> +	struct snd_soc_card *soc_card = platform_get_drvdata(pdev);
>> +
>> +	snd_soc_card_set_drvdata(soc_card, NULL);
>> +	snd_soc_unregister_card(soc_card);
>> +	platform_set_drvdata(pdev, NULL);
> No need for any of the _set_drvdata() calls, the core does them and they
> shouldn't make any difference anyway.
Done. I will remove *_set_drvdata and *get_drvdata because we don't need 
them any more.

Thanks.


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ