Skip to content

Commit

Permalink
imx: serial: fix one bit field type
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
dgloeck authored and torvalds committed Jun 11, 2009
1 parent d3810cd commit 26bbb3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down

0 comments on commit 26bbb3f

Please sign in to comment.