[PATCH 37/48] ARM: PL08x: use min() to calculate target_len
Russell King - ARM Linux
linux at arm.linux.org.uk
Mon Jan 3 17:42:34 EST 2011
Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
---
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 7c327c3..91dd6bf 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,
* If enough left try to send max possible,
* otherwise try to send the remainder
*/
- target_len = remainder;
- if (remainder > max_bytes_per_lli)
- target_len = max_bytes_per_lli;
+ target_len = min(remainder, max_bytes_per_lli);
/*
* Set bus lengths for incrementing buses
--
1.6.2.5
More information about the linux-arm-kernel
mailing list