未验证 提交 1476105c 编写于 作者: N Nicolin Chen 提交者: Mark Brown

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: NNicolin Chen <nicoleotsuka@gmail.com>
Tested-by: NCaleb Crome <caleb@crome.org>
Tested-by: NMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Reviewed-by: NMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 da18bcf7
......@@ -56,6 +56,10 @@
#include "fsl_ssi.h"
#include "imx-pcm.h"
/* Define RX and TX to index ssi->regvals array; Can be 0 or 1 only */
#define RX 0
#define TX 1
/**
* FSLSSI_I2S_FORMATS: audio formats supported by the SSI
*
......
......@@ -12,9 +12,6 @@
#ifndef _MPC8610_I2S_H
#define _MPC8610_I2S_H
#define RX 0
#define TX 1
/* -- SSI Register Map -- */
/* SSI Transmit Data Register 0 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册