summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikita Yushchenko <nikita.yoush@cogentembedded.com>2022-02-08 09:42:20 +0100
committerMark Brown <broonie@kernel.org>2022-02-14 13:52:55 +0100
commit3e63d3c1a2e52fb60d66bb23cb62c92c92ad0a3f (patch)
tree607327596c83fcfcc7ab90510d1cd9d4c61ac525
parentASoC: pcm3168a: refactor format handling (diff)
downloadlinux-3e63d3c1a2e52fb60d66bb23cb62c92c92ad0a3f.tar.xz
linux-3e63d3c1a2e52fb60d66bb23cb62c92c92ad0a3f.zip
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>
-rw-r--r--sound/soc/codecs/pcm3168a.c5
1 files 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;