[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-sh
Subject:    [PATCH] sh-sci: avoid writing to nonexistent registers
From:       Magnus Damm <magnus.damm () gmail ! com>
Date:       2008-04-23 12:37:39
Message-ID: 20080423123739.7941.53715.sendpatchset () rx1 ! opensource ! se
[Download RAW message or body]

Only write to hardware in SCI_OUT() if the register size is valid.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
---

 drivers/serial/sh-sci.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 0011/drivers/serial/sh-sci.h
+++ work/drivers/serial/sh-sci.h	2008-04-23 19:45:46.000000000 +0900
@@ -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);					\
   }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic