diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/serial/68328serial.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/serial/68328serial.c')
-rw-r--r-- | drivers/serial/68328serial.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c index d935b2d04f93..78ed24bb6a35 100644 --- a/drivers/serial/68328serial.c +++ b/drivers/serial/68328serial.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/pm.h> | 35 | #include <linux/pm.h> |
36 | #include <linux/bitops.h> | 36 | #include <linux/bitops.h> |
37 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
38 | #include <linux/gfp.h> | ||
38 | 39 | ||
39 | #include <asm/io.h> | 40 | #include <asm/io.h> |
40 | #include <asm/irq.h> | 41 | #include <asm/irq.h> |
@@ -153,8 +154,6 @@ static int baud_table[] = { | |||
153 | 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, | 154 | 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, |
154 | 9600, 19200, 38400, 57600, 115200, 0 }; | 155 | 9600, 19200, 38400, 57600, 115200, 0 }; |
155 | 156 | ||
156 | #define BAUD_TABLE_SIZE (sizeof(baud_table)/sizeof(baud_table[0])) | ||
157 | |||
158 | /* Sets or clears DTR/RTS on the requested line */ | 157 | /* Sets or clears DTR/RTS on the requested line */ |
159 | static inline void m68k_rtsdtr(struct m68k_serial *ss, int set) | 158 | static inline void m68k_rtsdtr(struct m68k_serial *ss, int set) |
160 | { | 159 | { |
@@ -1406,10 +1405,10 @@ static void m68328_set_baud(void) | |||
1406 | USTCNT = ustcnt & ~USTCNT_TXEN; | 1405 | USTCNT = ustcnt & ~USTCNT_TXEN; |
1407 | 1406 | ||
1408 | again: | 1407 | again: |
1409 | for (i = 0; i < sizeof(baud_table) / sizeof(baud_table[0]); i++) | 1408 | for (i = 0; i < ARRAY_SIZE(baud_table); i++) |
1410 | if (baud_table[i] == m68328_console_baud) | 1409 | if (baud_table[i] == m68328_console_baud) |
1411 | break; | 1410 | break; |
1412 | if (i >= sizeof(baud_table) / sizeof(baud_table[0])) { | 1411 | if (i >= ARRAY_SIZE(baud_table)) { |
1413 | m68328_console_baud = 9600; | 1412 | m68328_console_baud = 9600; |
1414 | goto again; | 1413 | goto again; |
1415 | } | 1414 | } |
@@ -1435,7 +1434,7 @@ int m68328_console_setup(struct console *cp, char *arg) | |||
1435 | if (arg) | 1434 | if (arg) |
1436 | n = simple_strtoul(arg,NULL,0); | 1435 | n = simple_strtoul(arg,NULL,0); |
1437 | 1436 | ||
1438 | for (i = 0; i < BAUD_TABLE_SIZE; i++) | 1437 | for (i = 0; i < ARRAY_SIZE(baud_table); i++) |
1439 | if (baud_table[i] == n) | 1438 | if (baud_table[i] == n) |
1440 | break; | 1439 | break; |
1441 | if (i < BAUD_TABLE_SIZE) { | 1440 | if (i < BAUD_TABLE_SIZE) { |