]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: fsl_ssi: Redefine RX and TX macros
authorNicolin Chen <nicoleotsuka@gmail.com>
Mon, 12 Feb 2018 22:03:09 +0000 (14:03 -0800)
committerMark Brown <broonie@kernel.org>
Wed, 21 Feb 2018 12:30:47 +0000 (12:30 +0000)
commitb6a9c6f988f3f1e53670f1942c9af46ed93e4fda
treec5176be911f3d7677bad9f6951e61ac4b0f1eca6
parentdef9a3bc8f4ba1dbd3181c4c75648b60b702e2d2
ASoC: fsl_ssi: Redefine RX and TX macros

The RX and TX macros were defined implicitly and there was
a potential risk if someone changes their values.

Since they were defined to index the array ssi->regvals[2],
this patch moves these two macros to fsl_ssi.c, closer to
its owner ssi->regvals. And it also puts some comments here
to limit their value within [0, 1].

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Tested-by: Caleb Crome <caleb@crome.org>
Tested-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Reviewed-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_ssi.c
sound/soc/fsl/fsl_ssi.h