projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7299cc0
)
ASoC: codecs: Use ARRAY_SIZE() to calculate PEB2466_TLV_SIZE
author
Thorsten Blum
<thorsten.blum@linux.dev>
Mon, 13 Jan 2025 00:10:01 +0000
(
01:10
+0100)
committer
Mark Brown
<broonie@kernel.org>
Mon, 13 Jan 2025 16:00:20 +0000
(16:00 +0000)
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>
sound/soc/codecs/peb2466.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/soc/codecs/peb2466.c
b/sound/soc/codecs/peb2466.c
index bb9ca6354ae1b03b45c6b23eaeb05fa59a240412..a989cfe058f02b5834f841384e2de0ecf34b2a1f 100644
(file)
--- 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;