diff options
author | Tobias Klauser <tklauser@nuerscht.ch> | 2006-01-09 23:54:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 11:01:56 -0500 |
commit | fe971071a89c5c5184fc9f3482c7a8e997cf0520 (patch) | |
tree | 74a29e80d5636255f33c750482497a32d8d3491f /drivers/char/riscom8.c | |
parent | 3c6bee1d4037a5c569f30d40bd852a57ba250912 (diff) |
[PATCH] drivers/char: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove
duplicates of ARRAY_SIZE.
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/riscom8.c')
-rw-r--r-- | drivers/char/riscom8.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index 55a3a0188eda..5dae32521620 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c | |||
@@ -107,15 +107,15 @@ static struct riscom_port rc_port[RC_NBOARD * RC_NPORT]; | |||
107 | 107 | ||
108 | /* RISCom/8 I/O ports addresses (without address translation) */ | 108 | /* RISCom/8 I/O ports addresses (without address translation) */ |
109 | static unsigned short rc_ioport[] = { | 109 | static unsigned short rc_ioport[] = { |
110 | #if 1 | 110 | #if 1 |
111 | 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x09, 0x0a, 0x0b, 0x0c, | 111 | 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x09, 0x0a, 0x0b, 0x0c, |
112 | #else | 112 | #else |
113 | 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x09, 0x0a, 0x0b, 0x0c, 0x10, | 113 | 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x09, 0x0a, 0x0b, 0x0c, 0x10, |
114 | 0x11, 0x12, 0x18, 0x28, 0x31, 0x32, 0x39, 0x3a, 0x40, 0x41, 0x61, 0x62, | 114 | 0x11, 0x12, 0x18, 0x28, 0x31, 0x32, 0x39, 0x3a, 0x40, 0x41, 0x61, 0x62, |
115 | 0x63, 0x64, 0x6b, 0x70, 0x71, 0x78, 0x7a, 0x7b, 0x7f, 0x100, 0x101 | 115 | 0x63, 0x64, 0x6b, 0x70, 0x71, 0x78, 0x7a, 0x7b, 0x7f, 0x100, 0x101 |
116 | #endif | 116 | #endif |
117 | }; | 117 | }; |
118 | #define RC_NIOPORT (sizeof(rc_ioport) / sizeof(rc_ioport[0])) | 118 | #define RC_NIOPORT ARRAY_SIZE(rc_ioport) |
119 | 119 | ||
120 | 120 | ||
121 | static inline int rc_paranoia_check(struct riscom_port const * port, | 121 | static inline int rc_paranoia_check(struct riscom_port const * port, |