diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2008-11-07 02:11:47 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2008-12-24 19:01:40 -0500 |
commit | 69c35efcf1576ab5f00cba83e8ca740923afb6c9 (patch) | |
tree | faf3bba45be45d530e3355c46d6bf2cd99d0e83c /include/linux/crc32c.h | |
parent | 8e3ee85e68c5d5c95451afd3e8f0997eec6f99e5 (diff) |
libcrc32c: Move implementation to crypto crc32c
This patch swaps the role of libcrc32c and crc32c. Previously
the implementation was in libcrc32c and crc32c was a wrapper.
Now the code is in crc32c and libcrc32c just calls the crypto
layer.
The reason for the change is to tap into the algorithm selection
capability of the crypto API so that optimised implementations
such as the one utilising Intel's CRC32C instruction can be
used where available.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/crc32c.h')
-rw-r--r-- | include/linux/crc32c.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/crc32c.h b/include/linux/crc32c.h index 508f512e5a2..66fa8ff795e 100644 --- a/include/linux/crc32c.h +++ b/include/linux/crc32c.h | |||
@@ -3,9 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | extern u32 crc32c_le(u32 crc, unsigned char const *address, size_t length); | 6 | extern u32 crc32c(u32 crc, const void *address, unsigned int length); |
7 | extern u32 crc32c_be(u32 crc, unsigned char const *address, size_t length); | ||
8 | |||
9 | #define crc32c(seed, data, length) crc32c_le(seed, (unsigned char const *)data, length) | ||
10 | 7 | ||
11 | #endif /* _LINUX_CRC32C_H */ | 8 | #endif /* _LINUX_CRC32C_H */ |