From: Magnus Damm Date: Wed, 23 Apr 2008 12:37:39 +0000 (+0900) Subject: sh-sci: avoid writing to nonexistent registers X-Git-Tag: v2.6.26-rc2~14^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d2c2f3ef7c5425d23424326a2345c385bb2d415;p=linux-2.6 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 b0dac379de..eb84833233 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); \ }