diff options
author | Thorsten Blum <thorsten.blum@linux.dev> | 2025-01-13 03:10:01 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-01-13 19:00:20 +0300 |
commit | 8eb27b5758e6fb6d1881413e3f1159c579ac48b3 (patch) | |
tree | caaf8bad54939f0e47e2d0cc125dfc4ef06f2151 /sound/soc/codecs | |
parent | 7299cc06fe4ab2ac26af73ac5fecd35a28fef527 (diff) | |
download | linux-8eb27b5758e6fb6d1881413e3f1159c579ac48b3.tar.xz |
ASoC: codecs: Use ARRAY_SIZE() to calculate PEB2466_TLV_SIZE
Use the ARRAY_SIZE() macro to calculate PEB2466_TLV_SIZE and improve the
code's readability.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Acked-by: Herve Codina <herve.codina@bootlin.com>
Link: https://patch.msgid.link/20250113001001.400669-2-thorsten.blum@linux.dev
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/peb2466.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/codecs/peb2466.c b/sound/soc/codecs/peb2466.c index bb9ca6354ae1..a989cfe058f0 100644 --- a/sound/soc/codecs/peb2466.c +++ b/sound/soc/codecs/peb2466.c @@ -26,8 +26,7 @@ struct peb2466_lookup { unsigned int count; }; -#define PEB2466_TLV_SIZE (sizeof((unsigned int []){TLV_DB_SCALE_ITEM(0, 0, 0)}) / \ - sizeof(unsigned int)) +#define PEB2466_TLV_SIZE ARRAY_SIZE(((unsigned int[]){TLV_DB_SCALE_ITEM(0, 0, 0)})) struct peb2466_lkup_ctrl { int reg; |