diff options
author | Russell King - ARM Linux <linux@arm.linux.org.uk> | 2011-01-03 17:42:34 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-01-04 22:16:13 -0500 |
commit | d6cf7b597f7158616106068930d1c6203d9359eb (patch) | |
tree | a1d640957f21926f2f65e96804ecd18f72047413 /drivers/dma/amba-pl08x.c | |
parent | b61be8d728abad7fd98e62e98f22325f8f254b51 (diff) |
ARM: PL08x: use min() to calculate target_len
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/amba-pl08x.c')
-rw-r--r-- | drivers/dma/amba-pl08x.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index 7c327c315878..91dd6bfcc30f 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c | |||
@@ -682,9 +682,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x, | |||
682 | * If enough left try to send max possible, | 682 | * If enough left try to send max possible, |
683 | * otherwise try to send the remainder | 683 | * otherwise try to send the remainder |
684 | */ | 684 | */ |
685 | target_len = remainder; | 685 | target_len = min(remainder, max_bytes_per_lli); |
686 | if (remainder > max_bytes_per_lli) | ||
687 | target_len = max_bytes_per_lli; | ||
688 | 686 | ||
689 | /* | 687 | /* |
690 | * Set bus lengths for incrementing buses | 688 | * Set bus lengths for incrementing buses |