From: Magnus Damm Date: Wed, 23 Apr 2008 12:37:39 +0000 (+0900) Subject: sh-sci: avoid writing to nonexistent registers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3d2c2f3ef7c5425d23424326a2345c385bb2d415;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Paul Mundt --- 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); \ }