lkml.org 
[lkml]   [2009]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] icom: bit and/or confusion?
Previously, if any bit other than CMD_SND_BREAK was set, CMD_SND_BREAK
was not unset.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
I think meant was: If CMD_SND_BREAK is set, unset it. Correct?

// vi drivers/serial/icom.h +137
#define CMD_SND_BREAK 0x04

diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index cd1b6a4..060f4e3 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -617,7 +617,7 @@ static void shutdown(struct icom_port *icom_port)
* disable break condition
*/
cmdReg = readb(&icom_port->dram->CmdReg);
- if ((cmdReg | CMD_SND_BREAK) == CMD_SND_BREAK) {
+ if (cmdReg & CMD_SND_BREAK) {
writeb(cmdReg & ~CMD_SND_BREAK, &icom_port->dram->CmdReg);
}
}

\
 
 \ /
  Last update: 2009-08-14 14:01    [W:0.036 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site