btrfs: Use real device structure to verify dev extent
[sfrench/cifs-2.6.git] / crypto / crypto_null.c
index 0959b268966c6e9e8700937c8f2dbf7f682f6309..0bae59922a8055d715e5598a34a9479e07a947c4 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/string.h>
 
 static DEFINE_MUTEX(crypto_default_null_skcipher_lock);
-static struct crypto_skcipher *crypto_default_null_skcipher;
+static struct crypto_sync_skcipher *crypto_default_null_skcipher;
 static int crypto_default_null_skcipher_refcnt;
 
 static int null_compress(struct crypto_tfm *tfm, const u8 *src,
@@ -152,16 +152,15 @@ MODULE_ALIAS_CRYPTO("compress_null");
 MODULE_ALIAS_CRYPTO("digest_null");
 MODULE_ALIAS_CRYPTO("cipher_null");
 
-struct crypto_skcipher *crypto_get_default_null_skcipher(void)
+struct crypto_sync_skcipher *crypto_get_default_null_skcipher(void)
 {
-       struct crypto_skcipher *tfm;
+       struct crypto_sync_skcipher *tfm;
 
        mutex_lock(&crypto_default_null_skcipher_lock);
        tfm = crypto_default_null_skcipher;
 
        if (!tfm) {
-               tfm = crypto_alloc_skcipher("ecb(cipher_null)",
-                                           0, CRYPTO_ALG_ASYNC);
+               tfm = crypto_alloc_sync_skcipher("ecb(cipher_null)", 0, 0);
                if (IS_ERR(tfm))
                        goto unlock;
 
@@ -181,7 +180,7 @@ void crypto_put_default_null_skcipher(void)
 {
        mutex_lock(&crypto_default_null_skcipher_lock);
        if (!--crypto_default_null_skcipher_refcnt) {
-               crypto_free_skcipher(crypto_default_null_skcipher);
+               crypto_free_sync_skcipher(crypto_default_null_skcipher);
                crypto_default_null_skcipher = NULL;
        }
        mutex_unlock(&crypto_default_null_skcipher_lock);