aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vme
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/vme')
-rw-r--r--drivers/vme/bridges/vme_ca91cx42.c4
-rw-r--r--drivers/vme/bridges/vme_tsi148.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c
index a06edbfa95ca..1b5d48c578e1 100644
--- a/drivers/vme/bridges/vme_ca91cx42.c
+++ b/drivers/vme/bridges/vme_ca91cx42.c
@@ -884,7 +884,7 @@ static ssize_t ca91cx42_master_read(struct vme_master_resource *image,
884 if (done == count) 884 if (done == count)
885 goto out; 885 goto out;
886 } 886 }
887 if ((uintptr_t)addr & 0x2) { 887 if ((uintptr_t)(addr + done) & 0x2) {
888 if ((count - done) < 2) { 888 if ((count - done) < 2) {
889 *(u8 *)(buf + done) = ioread8(addr + done); 889 *(u8 *)(buf + done) = ioread8(addr + done);
890 done += 1; 890 done += 1;
@@ -938,7 +938,7 @@ static ssize_t ca91cx42_master_write(struct vme_master_resource *image,
938 if (done == count) 938 if (done == count)
939 goto out; 939 goto out;
940 } 940 }
941 if ((uintptr_t)addr & 0x2) { 941 if ((uintptr_t)(addr + done) & 0x2) {
942 if ((count - done) < 2) { 942 if ((count - done) < 2) {
943 iowrite8(*(u8 *)(buf + done), addr + done); 943 iowrite8(*(u8 *)(buf + done), addr + done);
944 done += 1; 944 done += 1;
diff --git a/drivers/vme/bridges/vme_tsi148.c b/drivers/vme/bridges/vme_tsi148.c
index 16830d8b777c..9911cd5fddb5 100644
--- a/drivers/vme/bridges/vme_tsi148.c
+++ b/drivers/vme/bridges/vme_tsi148.c
@@ -1289,7 +1289,7 @@ static ssize_t tsi148_master_read(struct vme_master_resource *image, void *buf,
1289 if (done == count) 1289 if (done == count)
1290 goto out; 1290 goto out;
1291 } 1291 }
1292 if ((uintptr_t)addr & 0x2) { 1292 if ((uintptr_t)(addr + done) & 0x2) {
1293 if ((count - done) < 2) { 1293 if ((count - done) < 2) {
1294 *(u8 *)(buf + done) = ioread8(addr + done); 1294 *(u8 *)(buf + done) = ioread8(addr + done);
1295 done += 1; 1295 done += 1;
@@ -1371,7 +1371,7 @@ static ssize_t tsi148_master_write(struct vme_master_resource *image, void *buf,
1371 if (done == count) 1371 if (done == count)
1372 goto out; 1372 goto out;
1373 } 1373 }
1374 if ((uintptr_t)addr & 0x2) { 1374 if ((uintptr_t)(addr + done) & 0x2) {
1375 if ((count - done) < 2) { 1375 if ((count - done) < 2) {
1376 iowrite8(*(u8 *)(buf + done), addr + done); 1376 iowrite8(*(u8 *)(buf + done), addr + done);
1377 done += 1; 1377 done += 1;