sata_mv: fix pci_enable_msi() error handling
[powerpc.git] / crypto / lrw.c
index 5d04315..b410508 100644 (file)
@@ -95,7 +95,7 @@ static inline void inc(be128 *iv)
                iv->a = cpu_to_be64(be64_to_cpu(iv->a) + 1);
 }
 
-static inline void round(struct sinfo *s, void *dst, const void *src)
+static inline void lrw_round(struct sinfo *s, void *dst, const void *src)
 {
        be128_xor(dst, &s->t, src);             /* PP <- T xor P */
        s->fn(s->tfm, dst, dst);                /* CC <- E(Key2,PP) */
@@ -160,7 +160,7 @@ static int crypt(struct blkcipher_desc *d,
                        inc(iv);
 
 first:
-                       round(&s, wdst, wsrc);
+                       lrw_round(&s, wdst, wsrc);
 
                        wsrc += bs;
                        wdst += bs;
@@ -201,21 +201,22 @@ static int decrypt(struct blkcipher_desc *desc, struct scatterlist *dst,
 
 static int init_tfm(struct crypto_tfm *tfm)
 {
+       struct crypto_cipher *cipher;
        struct crypto_instance *inst = (void *)tfm->__crt_alg;
        struct crypto_spawn *spawn = crypto_instance_ctx(inst);
        struct priv *ctx = crypto_tfm_ctx(tfm);
        u32 *flags = &tfm->crt_flags;
 
-       tfm = crypto_spawn_tfm(spawn);
-       if (IS_ERR(tfm))
-               return PTR_ERR(tfm);
+       cipher = crypto_spawn_cipher(spawn);
+       if (IS_ERR(cipher))
+               return PTR_ERR(cipher);
 
-       if (crypto_tfm_alg_blocksize(tfm) != 16) {
+       if (crypto_cipher_blocksize(cipher) != 16) {
                *flags |= CRYPTO_TFM_RES_BAD_BLOCK_LEN;
                return -EINVAL;
        }
 
-       ctx->child = crypto_cipher_cast(tfm);
+       ctx->child = cipher;
        return 0;
 }