]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
imx: serial: fix one bit field type
authorDaniel Glöckner <dg@emlix.com>
Thu, 11 Jun 2009 13:36:29 +0000 (14:36 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Jun 2009 15:51:08 +0000 (08:51 -0700)
"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 <dg@emlix.com>
Signed-off-by: Oskar Schirmer <os@emlix.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/serial/imx.c

index 76c8fa1884ecc93367396eb78a200b43c557b2a2..6b8f12f4a7054f12f481137189b857c8ca016021 100644 (file)
@@ -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;
 };