summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMagnus Damm <magnus.damm@gmail.com>2008-04-23 21:37:39 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-05-08 19:51:59 +0900
commit3d2c2f3ef7c5425d23424326a2345c385bb2d415 (patch)
tree133bb7cb23fb8b8a32f6a2659685d0940794313b /drivers
parent9b4e466f93c6b614d05139d84a930a55fe4cd781 (diff)
downloadlinux-stable-3d2c2f3ef7c5425d23424326a2345c385bb2d415.tar.gz
linux-stable-3d2c2f3ef7c5425d23424326a2345c385bb2d415.tar.bz2
linux-stable-3d2c2f3ef7c5425d23424326a2345c385bb2d415.zip
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.h2
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); \
}