aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vme/bridges/vme_tsi148.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/vme/bridges/vme_tsi148.c')
-rw-r--r--drivers/vme/bridges/vme_tsi148.c4
1 files changed, 2 insertions, 2 deletions
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;