From: Russell King - ARM Linux Date: Mon, 3 Jan 2011 22:46:17 +0000 (+0000) Subject: ARM: PL08x: prevent dma_set_runtime_config() reconfiguring memcpy channels X-Git-Tag: v2.6.38-rc1~25^2~11^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7f758659265c173380b792862aaad1c23c0e004;p=platform%2Fkernel%2Flinux-exynos.git 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: Russell King Acked-by: Linus Walleij Signed-off-by: Dan Williams --- diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index c7f7b82..bebc678 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c @@ -1129,6 +1129,9 @@ static int dma_set_runtime_config(struct dma_chan *chan, u32 cctl = 0; int i; + if (!plchan->slave) + return -EINVAL; + /* Transfer direction */ plchan->runtime_direction = config->direction; if (config->direction == DMA_TO_DEVICE) {