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]
Message-ID: <530B8741.3010302@metafoo.de>
Date:	Mon, 24 Feb 2014 18:54:09 +0100
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Nicolin Chen <Guangyu.Chen@...escale.com>
CC:	broonie@...nel.org, brian.austin@...rus.com,
	Paul.Handrigan@...rus.com, mark.rutland@....com,
	devicetree@...r.kernel.org, alsa-devel@...a-project.org,
	pawel.moll@....com, ijc+devicetree@...lion.org.uk,
	linux-doc@...r.kernel.org, lgirdwood@...il.com,
	linux-kernel@...r.kernel.org, robh+dt@...nel.org, rob@...dley.net,
	galak@...eaurora.org, grant.likely@...aro.org
Subject: Re: [alsa-devel] [PATCH] ASoC: cs42888: Add codec driver support

Hi,

Couple of trivial things.

On 02/24/2014 07:55 AM, Nicolin Chen wrote:
[...]
> +config SND_SOC_CS42888
> +	tristate "Cirrus Logic CS42888 CODEC"
> +	depends on I2C

should select REGMAP_I2C

> +
[...]
> +#define CS42888_NUM_SUPPLIES 4
> +static const char *cs42888_supply_names[CS42888_NUM_SUPPLIES] = {

const char *const

> +	"VA",
> +	"VD",
> +	"VLS",
> +	"VLC",
> +};
> +
> +static const char *cs42888_adc_single[] = { "Differential", "Single-Ended" };

const char * const

> +static const char *cs42888_szc[] = { "Immediate Change", "Zero Cross",
> +				     "Soft Ramp", "Soft Ramp on Zero Cross" };
> +

const char * constr

> +static const struct soc_enum cs42888_enum[] = {
> +	SOC_ENUM_SINGLE(CS42888_ADCCTL, 4, 2, cs42888_adc_single),
> +	SOC_ENUM_SINGLE(CS42888_ADCCTL, 3, 2, cs42888_adc_single),
> +	SOC_ENUM_SINGLE(CS42888_TXCTL, 5, 4, cs42888_szc),
> +	SOC_ENUM_SINGLE(CS42888_TXCTL, 0, 4, cs42888_szc),
> +};

Usually it makes things a bit more clearer when you have a variable with a 
unique name for each enum rather then putting them into one large array.

> +
[...]
> +static struct cs42888_ratios cs42888_ratios[] = {

const

[...]
> +static struct snd_soc_dai_ops cs42888_dai_ops = {

const

> +	.set_fmt	= cs42888_set_dai_fmt,
> +	.set_sysclk	= cs42888_set_dai_sysclk,
> +	.hw_params	= cs42888_hw_params,
> +	.digital_mute	= cs42888_digital_mute,
> +};
> +
[...]
> +
> +static struct reg_default cs42888_reg[] = {

const
[...]
> +
> +static struct snd_soc_codec_driver cs42888_driver = {

const

> +	.probe = cs42888_probe,
> +	.idle_bias_off = true,
> +
> +	.controls = cs42888_snd_controls,
> +	.num_controls = ARRAY_SIZE(cs42888_snd_controls),
> +	.dapm_widgets = cs42888_dapm_widgets,
> +	.num_dapm_widgets = ARRAY_SIZE(cs42888_dapm_widgets),
> +	.dapm_routes = cs42888_dapm_routes,
> +	.num_dapm_routes = ARRAY_SIZE(cs42888_dapm_routes),
> +};
> +

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