summaryrefslogtreecommitdiffstats
path: root/arm-dma-amba_pl08x-avoid-64bit-division.patch
diff options
context:
space:
mode:
authorKyle McMartin <kyle@redhat.com>2013-07-29 15:35:19 -0400
committerKyle McMartin <kyle@redhat.com>2013-07-29 15:35:19 -0400
commita2366c039728a418d69841f36b04bb6f8201a71b (patch)
treea10678a1636e2883d1f10bfc758dfa24618ba361 /arm-dma-amba_pl08x-avoid-64bit-division.patch
parent3f8c3dd60515c910a675a97197f7f330350749e6 (diff)
downloadkernel-a2366c039728a418d69841f36b04bb6f8201a71b.tar.gz
kernel-a2366c039728a418d69841f36b04bb6f8201a71b.tar.xz
kernel-a2366c039728a418d69841f36b04bb6f8201a71b.zip
arm-dma-amba_pl08x-avoid-64bit-division.patch: get rid of another 64-bit division
Diffstat (limited to 'arm-dma-amba_pl08x-avoid-64bit-division.patch')
-rw-r--r--arm-dma-amba_pl08x-avoid-64bit-division.patch15
1 files changed, 9 insertions, 6 deletions
diff --git a/arm-dma-amba_pl08x-avoid-64bit-division.patch b/arm-dma-amba_pl08x-avoid-64bit-division.patch
index 7556e2328..01da25c1f 100644
--- a/arm-dma-amba_pl08x-avoid-64bit-division.patch
+++ b/arm-dma-amba_pl08x-avoid-64bit-division.patch
@@ -1,5 +1,5 @@
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
-index 06fe45c..4ce4ac1 100644
+index 06fe45c..63744cf 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -886,8 +886,8 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
@@ -13,16 +13,19 @@ index 06fe45c..4ce4ac1 100644
dev_err(&pl08x->adev->dev,
"%s src & dst address must be aligned to src"
" & dst width if peripheral is flow controller",
-@@ -908,7 +908,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
+@@ -908,9 +908,8 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
*/
if (bd.remainder < mbus->buswidth)
early_bytes = bd.remainder;
- else if ((mbus->addr) % (mbus->buswidth)) {
-+ else if (((u8)(mbus->addr & 0xff)) % (mbus->buswidth)) {
- early_bytes = mbus->buswidth - (mbus->addr) %
- (mbus->buswidth);
+- early_bytes = mbus->buswidth - (mbus->addr) %
+- (mbus->buswidth);
++ else if ((early_bytes = (u8)(mbus->addr & 0xff) % mbus->buswidth)) {
++ early_bytes = mbus->buswidth - early_bytes;
if ((bd.remainder - early_bytes) < mbus->buswidth)
-@@ -928,7 +928,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
+ early_bytes = bd.remainder;
+ }
+@@ -928,7 +927,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
* Master now aligned
* - if slave is not then we must set its width down
*/