ASoC: pcm3168a: remove numeric PCM3168A_NUM_SUPPLIES

Just use ARRAY_SIZE() instead.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Link: https://lore.kernel.org/r/20220208084220.1289836-5-nikita.yoush@cogentembedded.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Nikita Yushchenko 2022-02-08 11:42:20 +03:00 committed by Mark Brown
parent 6bfc1242ee
commit 3e63d3c1a2
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -34,8 +34,7 @@
#define PCM3168A_FMT_I2S_TDM 0x6 #define PCM3168A_FMT_I2S_TDM 0x6
#define PCM3168A_FMT_LEFT_J_TDM 0x7 #define PCM3168A_FMT_LEFT_J_TDM 0x7
#define PCM3168A_NUM_SUPPLIES 6 static const char *const pcm3168a_supply_names[] = {
static const char *const pcm3168a_supply_names[PCM3168A_NUM_SUPPLIES] = {
"VDD1", "VDD1",
"VDD2", "VDD2",
"VCCAD1", "VCCAD1",
@ -57,7 +56,7 @@ struct pcm3168a_io_params {
}; };
struct pcm3168a_priv { 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 regmap *regmap;
struct clk *scki; struct clk *scki;
struct gpio_desc *gpio_rst; struct gpio_desc *gpio_rst;