diff options
author | Magnus Damm <magnus.damm@gmail.com> | 2008-04-23 21:37:39 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-05-08 19:51:59 +0900 |
commit | 3d2c2f3ef7c5425d23424326a2345c385bb2d415 (patch) | |
tree | 133bb7cb23fb8b8a32f6a2659685d0940794313b /drivers | |
parent | 9b4e466f93c6b614d05139d84a930a55fe4cd781 (diff) |
sh-sci: avoid writing to nonexistent registers
Only write to hardware in SCI_OUT() if the register size is valid.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/sh-sci.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h index b0dac379dee5..eb84833233fd 100644 --- a/drivers/serial/sh-sci.h +++ b/drivers/serial/sh-sci.h @@ -321,7 +321,7 @@ unsigned int addr = port->mapbase + (offset); \ if ((size) == 8) { \ ctrl_outb(value, addr); \ - } else { \ + } else if ((size) == 16) { \ ctrl_outw(value, addr); \ } |