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] [day] [month] [year] [list]
Message-ID: <5310481D.3070106@metafoo.de>
Date:	Fri, 28 Feb 2014 09:26:05 +0100
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Xiubo Li <Li.Xiubo@...escale.com>
CC:	broonie@...nel.org, lgirdwood@...il.com,
	alsa-devel@...a-project.org, kuninori.morimoto.gx@...esas.com,
	abrestic@...omium.org, viresh.kumar@...aro.org, timur@...i.org,
	peter.ujfalusi@...com, mr.swami.reddy@...com, voice.shen@...el.com,
	mike.dyer@...soft.co.uk, bardliao@...ltek.com, mahaijuns@...il.com,
	s.trumtrar@...gutronix.de, rf@...nsource.wolfsonmicro.com,
	LW@...O-electronics.de, swarren@...dia.com, shc_work@...l.ru,
	vinod.koul@...el.com, b42378@...escale.com,
	Paul.Handrigan@...rus.com, vishwas.a.deshpande@...com,
	Adam.Thomson.Opensource@...semi.com, axel.lin@...ics.com,
	ckeepax@...nsource.wolfsonmicro.com, dgreid@...omium.org,
	fabio.estevam@...escale.com, brian.austin@...rus.com,
	Andreas.Irestal@...s.com, linux-kernel@...r.kernel.org,
	sachin.kamat@...aro.org, mpa@...gutronix.de, shawn.guo@...aro.org,
	alban.bedel@...onic-design.de, jic23@...nel.org
Subject: Re: [alsa-devel] [PATCH 2/2] ASoC: io: Remove reduntant params of
 snd_soc_codec_set_cache_io()

On 02/28/2014 06:06 AM, Xiubo Li wrote:
[...]
> @@ -118,7 +115,6 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
>   EXPORT_SYMBOL_GPL(snd_soc_codec_set_cache_io);
>   #else
>   int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
> -			       int addr_bits, int data_bits,
>   			       enum snd_soc_control_type control)

Since the only control type that is left is SND_SOC_REGMAP that can be 
removed as well. And while you are at it I think we should make it possible 
to specify the regmap struct as a parameter to snd_soc_codec_set_cache_io(). 
So basically the new signature of the function should be:

snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, struct regmap *regmap)

if regmap is NULL the function should use dev_get_regmap(), otherwise use 
the supplied regmap struct. This turns the two step initialization in the 
form of

	codec->control_data = priv->regmap;
	snd_soc_codec_set_cache_io(codec, ...);

into
	snd_soc_codec_set_cache_io(codec, priv->regmap);

which is much nicer in my opinion.

- Lars

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