aboutsummaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorRussell King - ARM Linux <linux@arm.linux.org.uk>2011-01-03 22:46:17 +0000
committerDan Williams <dan.j.williams@intel.com>2011-01-04 19:16:14 -0800
commitb7f758659265c173380b792862aaad1c23c0e004 (patch)
treeb67550bae43e48026c00284a9a64257ef11aae43 /drivers/dma
parentf0fd944625b6e406dc273b8dffa16e0728c973e6 (diff)
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 <rmk+kernel@arm.linux.org.uk> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/amba-pl08x.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index c7f7b82f615..bebc678ed4f 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) {