X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=crypto%2Fserpent.c;h=db6beb63e707769e8fceea236058365f3e07a419;hp=465d091cd3ec3439fe65f0e91d48adc23151667e;hb=7cd39b9d24d65e47bb85c2f793f315ddd5475118;hpb=cdb8355add9b1d87ecfcb58b12879897dc1e3e36 diff --git a/crypto/serpent.c b/crypto/serpent.c index 465d091cd3ec..db6beb63e707 100644 --- a/crypto/serpent.c +++ b/crypto/serpent.c @@ -364,10 +364,10 @@ static void serpent_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) { struct serpent_ctx *ctx = crypto_tfm_ctx(tfm); const u32 - *k = ctx->expkey, - *s = (const u32 *)src; - u32 *d = (u32 *)dst, - r0, r1, r2, r3, r4; + *k = ctx->expkey; + const __le32 *s = (const __le32 *)src; + __le32 *d = (__le32 *)dst; + u32 r0, r1, r2, r3, r4; /* * Note: The conversions between u8* and u32* might cause trouble @@ -423,10 +423,10 @@ static void serpent_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) { struct serpent_ctx *ctx = crypto_tfm_ctx(tfm); const u32 - *k = ((struct serpent_ctx *)ctx)->expkey, - *s = (const u32 *)src; - u32 *d = (u32 *)dst, - r0, r1, r2, r3, r4; + *k = ((struct serpent_ctx *)ctx)->expkey; + const __le32 *s = (const __le32 *)src; + __le32 *d = (__le32 *)dst; + u32 r0, r1, r2, r3, r4; r0 = le32_to_cpu(s[0]); r1 = le32_to_cpu(s[1]); @@ -557,7 +557,7 @@ static struct crypto_alg tnepres_alg = { .cia_decrypt = tnepres_decrypt } } }; -static int __init init(void) +static int __init serpent_mod_init(void) { int ret = crypto_register_alg(&serpent_alg); @@ -572,16 +572,17 @@ static int __init init(void) return ret; } -static void __exit fini(void) +static void __exit serpent_mod_fini(void) { crypto_unregister_alg(&tnepres_alg); crypto_unregister_alg(&serpent_alg); } -module_init(init); -module_exit(fini); +module_init(serpent_mod_init); +module_exit(serpent_mod_fini); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Serpent and tnepres (kerneli compatible serpent reversed) Cipher Algorithm"); MODULE_AUTHOR("Dag Arne Osvik "); -MODULE_ALIAS("tnepres"); +MODULE_ALIAS_CRYPTO("tnepres"); +MODULE_ALIAS_CRYPTO("serpent");