提交 b7f75865 编写于 作者: R Russell King - ARM Linux 提交者: Dan Williams

ARM: PL08x: prevent dma_set_runtime_config() reconfiguring memcpy channels

Prevent dma_set_runtime_config() being used to alter the configuration
supplied by the platform for memcpy channel configuration.  No one
should be trying to change this configuration.
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
Signed-off-by: NDan Williams <dan.j.williams@intel.com>
上级 f0fd9446
...@@ -1129,6 +1129,9 @@ static int dma_set_runtime_config(struct dma_chan *chan, ...@@ -1129,6 +1129,9 @@ static int dma_set_runtime_config(struct dma_chan *chan,
u32 cctl = 0; u32 cctl = 0;
int i; int i;
if (!plchan->slave)
return -EINVAL;
/* Transfer direction */ /* Transfer direction */
plchan->runtime_direction = config->direction; plchan->runtime_direction = config->direction;
if (config->direction == DMA_TO_DEVICE) { if (config->direction == DMA_TO_DEVICE) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册