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
| ||
|
Date: Tue, 8 Feb 2022 11:42:20 +0300 From: Nikita Yushchenko <nikita.yoush@...entembedded.com> To: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>, Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>, Kuninori Morimoto <kuninori.morimoto.gx@...esas.com> Cc: alsa-devel@...a-project.org, linux-kernel@...r.kernel.org, Nikita Yushchenko <nikita.yoush@...entembedded.com> Subject: [PATCH 4/4] ASoC: pcm3168a: remove numeric PCM3168A_NUM_SUPPLIES Just use ARRAY_SIZE() instead. Signed-off-by: Nikita Yushchenko <nikita.yoush@...entembedded.com> --- sound/soc/codecs/pcm3168a.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c index 1d3821f2c5f1..7417cf45d916 100644 --- a/sound/soc/codecs/pcm3168a.c +++ b/sound/soc/codecs/pcm3168a.c @@ -34,8 +34,7 @@ #define PCM3168A_FMT_I2S_TDM 0x6 #define PCM3168A_FMT_LEFT_J_TDM 0x7 -#define PCM3168A_NUM_SUPPLIES 6 -static const char *const pcm3168a_supply_names[PCM3168A_NUM_SUPPLIES] = { +static const char *const pcm3168a_supply_names[] = { "VDD1", "VDD2", "VCCAD1", @@ -57,7 +56,7 @@ struct pcm3168a_io_params { }; struct pcm3168a_priv { - struct regulator_bulk_data supplies[PCM3168A_NUM_SUPPLIES]; + struct regulator_bulk_data supplies[ARRAY_SIZE(pcm3168a_supply_names)]; struct regmap *regmap; struct clk *scki; struct gpio_desc *gpio_rst; -- 2.30.2
Powered by blists - more mailing lists