diff options
author | Pascal COMBES | 2014-05-24 15:58:09 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2014-05-25 20:09:14 +0200 |
commit | 77870a1b856d181936ca13f6732010e63b803b4a (patch) | |
tree | 7b8211b7aea71d136814319ecf8d93629dec2d25 /drivers/staging/dgap | |
parent | staging: Convert __FUNCTION__ to __func__ (diff) | |
download | kernel-qcow2-linux-77870a1b856d181936ca13f6732010e63b803b4a.tar.gz kernel-qcow2-linux-77870a1b856d181936ca13f6732010e63b803b4a.tar.xz kernel-qcow2-linux-77870a1b856d181936ca13f6732010e63b803b4a.zip |
Staging: dgap: Fixed iomem accesses in dgap.c
I changed dereferences from iomem into the adequate ioread function.
Signed-off-by: Pascal COMBES <pascom@orange.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgap')
-rw-r--r-- | drivers/staging/dgap/dgap.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index ca264f950f9c..1475532b4df0 100644 --- a/drivers/staging/dgap/dgap.c +++ b/drivers/staging/dgap/dgap.c @@ -1431,8 +1431,8 @@ static int dgap_tty_init(struct board_t *brd) ch->ch_dsr = DM_DSR; } - ch->ch_taddr = vaddr + ((ch->ch_bs->tx_seg) << 4); - ch->ch_raddr = vaddr + ((ch->ch_bs->rx_seg) << 4); + ch->ch_taddr = vaddr + (ioread16(&(ch->ch_bs->tx_seg)) << 4); + ch->ch_raddr = vaddr + (ioread16(&(ch->ch_bs->rx_seg)) << 4); ch->ch_tx_win = 0; ch->ch_rx_win = 0; ch->ch_tsize = readw(&(ch->ch_bs->tx_max)) + 1; @@ -4958,8 +4958,8 @@ static uint dgap_get_custom_baud(struct channel_t *ch) * Go get from fep mem, what the fep * believes the custom baud rate is. */ - offset = ((((*(unsigned short __iomem *)(vaddr + ECS_SEG)) << 4) + - (ch->ch_portnum * 0x28) + LINE_SPEED)); + offset = (ioread16(vaddr + ECS_SEG) << 4) + (ch->ch_portnum * 0x28) + + LINE_SPEED; value = readw(vaddr + offset); return value; @@ -5506,10 +5506,10 @@ static int dgap_event(struct board_t *bd) event = bd->re_map_membase + tail + EVSTART; - port = event[0]; - reason = event[1]; - modem = event[2]; - b1 = event[3]; + port = ioread8(event); + reason = ioread8(event + 1); + modem = ioread8(event + 2); + b1 = ioread8(event + 3); /* * Make sure the interrupt is valid. |