diff options
author | Magnus Damm <magnus.damm@gmail.com> | 2008-04-23 12:37:39 (GMT) |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-05-08 10:51:59 (GMT) |
commit | 3d2c2f3ef7c5425d23424326a2345c385bb2d415 (patch) | |
tree | 133bb7cb23fb8b8a32f6a2659685d0940794313b /drivers/serial | |
parent | 9b4e466f93c6b614d05139d84a930a55fe4cd781 (diff) | |
download | linux-3d2c2f3ef7c5425d23424326a2345c385bb2d415.tar.xz |
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/serial')
-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 b0dac37..eb84833 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); \ } |