linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 29/31] serial: use parity32 in max3100.c
       [not found] <1458788612-4367-1-git-send-email-zhaoxiu.zeng@gmail.com>
@ 2016-03-27  7:44 ` zhaoxiu.zeng
  0 siblings, 0 replies; only message in thread
From: zhaoxiu.zeng @ 2016-03-27  7:44 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby; +Cc: linux-kernel, linux-serial

From: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>

Signed-off-by: Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com>
---
 drivers/tty/serial/max3100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c
index 5c4c280..a0cc84a 100644
--- a/drivers/tty/serial/max3100.c
+++ b/drivers/tty/serial/max3100.c
@@ -155,7 +155,7 @@ static int max3100_do_parity(struct max3100_port *s, u16 c)
 	else
 		c &= 0xff;
 
-	parity = parity ^ (hweight8(c) & 1);
+	parity ^= parity8(c);
 	return parity;
 }
 
-- 
2.5.5

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-03-27  7:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1458788612-4367-1-git-send-email-zhaoxiu.zeng@gmail.com>
2016-03-27  7:44 ` [PATCH 29/31] serial: use parity32 in max3100.c zhaoxiu.zeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).