Skip to content

Commit

Permalink
ARM: PL08x: prevent dma_set_runtime_config() reconfiguring memcpy cha…
Browse files Browse the repository at this point in the history
…nnels

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>
  • Loading branch information
Russell King - ARM Linux authored and Dan Williams committed Jan 5, 2011
1 parent f0fd944 commit b7f7586
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/dma/amba-pl08x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b7f7586

Please sign in to comment.