diff options
author | Matthew Wilcox <matthew@wil.cx> | 2006-10-11 04:22:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-11 14:14:23 -0400 |
commit | e50190a8341485b413f599033cb74649f849d939 (patch) | |
tree | c45e165f8167dd95f3b5d4163433b91c8b7afd55 /include/asm-arm | |
parent | 53d5ed627df852ba8bab7f70df25290bd733792c (diff) |
[PATCH] Consolidate check_signature
There's nothing arch-specific about check_signature(), so move it to
<linux/io.h>. Use a cross between the Alpha and i386 implementations as
the generic one.
Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/io.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index 34aaaac4f617..ae999fd5dc67 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h | |||
@@ -193,23 +193,6 @@ extern void _memset_io(volatile void __iomem *, int, size_t); | |||
193 | #define eth_io_copy_and_sum(s,c,l,b) \ | 193 | #define eth_io_copy_and_sum(s,c,l,b) \ |
194 | eth_copy_and_sum((s),__mem_pci(c),(l),(b)) | 194 | eth_copy_and_sum((s),__mem_pci(c),(l),(b)) |
195 | 195 | ||
196 | static inline int | ||
197 | check_signature(void __iomem *io_addr, const unsigned char *signature, | ||
198 | int length) | ||
199 | { | ||
200 | int retval = 0; | ||
201 | do { | ||
202 | if (readb(io_addr) != *signature) | ||
203 | goto out; | ||
204 | io_addr++; | ||
205 | signature++; | ||
206 | length--; | ||
207 | } while (length); | ||
208 | retval = 1; | ||
209 | out: | ||
210 | return retval; | ||
211 | } | ||
212 | |||
213 | #elif !defined(readb) | 196 | #elif !defined(readb) |
214 | 197 | ||
215 | #define readb(c) (__readwrite_bug("readb"),0) | 198 | #define readb(c) (__readwrite_bug("readb"),0) |