From: Daniel Glöckner Date: Thu, 11 Jun 2009 13:36:29 +0000 (+0100) Subject: imx: serial: fix one bit field type X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=26bbb3ff1ff6163d6a233055766e26af8054a212;p=linux-beck.git imx: serial: fix one bit field type "have_rtscts" is assigned 1, while it is declared int:1, two's complement, which can hold 0 and -1 only. The code works, as the upper bits are cut off, and tests are done against 0 only. Nonetheless, correctly declaring the bit field as unsigned int:1 renders the code more robust. Signed-off-by: Daniel Glöckner Signed-off-by: Oskar Schirmer Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds --- diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 76c8fa1884ec..6b8f12f4a705 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c @@ -211,7 +211,7 @@ struct imx_port { struct timer_list timer; unsigned int old_status; int txirq,rxirq,rtsirq; - int have_rtscts:1; + unsigned int have_rtscts:1; struct clk *clk; };