summaryrefslogtreecommitdiffstats
path: root/drivers/serial/sh-sci.h
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/serial/sh-sci.h
parent9b4e466f93c6b614d05139d84a930a55fe4cd781 (diff)
downloadop-kernel-dev-3d2c2f3ef7c5425d23424326a2345c385bb2d415.zip
op-kernel-dev-3d2c2f3ef7c5425d23424326a2345c385bb2d415.tar.gz
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/sh-sci.h')
-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 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); \
}
OpenPOWER on IntegriCloud