Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185176
b: refs/heads/master
c: 8b505ca
h: refs/heads/master
v: v3
  • Loading branch information
Thiago Farina authored and Greg Kroah-Hartman committed Mar 2, 2010
1 parent 0289ced commit 3fcc600
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5d228cc4f854aebcefac987d111fc072ecd15e0
refs/heads/master: 8b505ca8e2600eb9e7dd2d6b2682a81717671374
8 changes: 3 additions & 5 deletions trunk/drivers/serial/68328serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ static int baud_table[] = {
0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800,
9600, 19200, 38400, 57600, 115200, 0 };

#define BAUD_TABLE_SIZE (sizeof(baud_table)/sizeof(baud_table[0]))

/* Sets or clears DTR/RTS on the requested line */
static inline void m68k_rtsdtr(struct m68k_serial *ss, int set)
{
Expand Down Expand Up @@ -1406,10 +1404,10 @@ static void m68328_set_baud(void)
USTCNT = ustcnt & ~USTCNT_TXEN;

again:
for (i = 0; i < sizeof(baud_table) / sizeof(baud_table[0]); i++)
for (i = 0; i < ARRAY_SIZE(baud_table); i++)
if (baud_table[i] == m68328_console_baud)
break;
if (i >= sizeof(baud_table) / sizeof(baud_table[0])) {
if (i >= ARRAY_SIZE(baud_table)) {
m68328_console_baud = 9600;
goto again;
}
Expand All @@ -1435,7 +1433,7 @@ int m68328_console_setup(struct console *cp, char *arg)
if (arg)
n = simple_strtoul(arg,NULL,0);

for (i = 0; i < BAUD_TABLE_SIZE; i++)
for (i = 0; i < ARRAY_SIZE(baud_table); i++)
if (baud_table[i] == n)
break;
if (i < BAUD_TABLE_SIZE) {
Expand Down

0 comments on commit 3fcc600

Please sign in to comment.