Commit 8b505ca8e2600eb9e7dd2d6b2682a81717671374
Committed by
Greg Kroah-Hartman
1 parent
b5d228cc4f
Exists in
master
and in
7 other branches
serial: 68328serial.c: remove BAUD_TABLE_SIZE macro
This macro is a duplicate of ARRAY_SIZE defined in kernel api, so just use that instead. Signed-off-by: Thiago Farina <tfransosi@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Showing 1 changed file with 3 additions and 5 deletions Side-by-side Diff
drivers/serial/68328serial.c
... | ... | @@ -153,8 +153,6 @@ |
153 | 153 | 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, |
154 | 154 | 9600, 19200, 38400, 57600, 115200, 0 }; |
155 | 155 | |
156 | -#define BAUD_TABLE_SIZE (sizeof(baud_table)/sizeof(baud_table[0])) | |
157 | - | |
158 | 156 | /* Sets or clears DTR/RTS on the requested line */ |
159 | 157 | static inline void m68k_rtsdtr(struct m68k_serial *ss, int set) |
160 | 158 | { |
161 | 159 | |
... | ... | @@ -1406,10 +1404,10 @@ |
1406 | 1404 | USTCNT = ustcnt & ~USTCNT_TXEN; |
1407 | 1405 | |
1408 | 1406 | again: |
1409 | - for (i = 0; i < sizeof(baud_table) / sizeof(baud_table[0]); i++) | |
1407 | + for (i = 0; i < ARRAY_SIZE(baud_table); i++) | |
1410 | 1408 | if (baud_table[i] == m68328_console_baud) |
1411 | 1409 | break; |
1412 | - if (i >= sizeof(baud_table) / sizeof(baud_table[0])) { | |
1410 | + if (i >= ARRAY_SIZE(baud_table)) { | |
1413 | 1411 | m68328_console_baud = 9600; |
1414 | 1412 | goto again; |
1415 | 1413 | } |
... | ... | @@ -1435,7 +1433,7 @@ |
1435 | 1433 | if (arg) |
1436 | 1434 | n = simple_strtoul(arg,NULL,0); |
1437 | 1435 | |
1438 | - for (i = 0; i < BAUD_TABLE_SIZE; i++) | |
1436 | + for (i = 0; i < ARRAY_SIZE(baud_table); i++) | |
1439 | 1437 | if (baud_table[i] == n) |
1440 | 1438 | break; |
1441 | 1439 | if (i < BAUD_TABLE_SIZE) { |