]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/crypto/n2_core.c
crypto: drop owner assignment from platform_drivers
[karo-tx-linux.git] / drivers / crypto / n2_core.c
index 7263c10a56ee30914c1916418559901fa5090d7f..afd136b45f49b1fa0a933cd4a33412f830298bcb 100644 (file)
@@ -445,10 +445,7 @@ static int n2_hmac_async_setkey(struct crypto_ahash *tfm, const u8 *key,
        struct n2_hmac_ctx *ctx = crypto_ahash_ctx(tfm);
        struct crypto_shash *child_shash = ctx->child_shash;
        struct crypto_ahash *fallback_tfm;
-       struct {
-               struct shash_desc shash;
-               char ctx[crypto_shash_descsize(child_shash)];
-       } desc;
+       SHASH_DESC_ON_STACK(shash, child_shash);
        int err, bs, ds;
 
        fallback_tfm = ctx->base.fallback_tfm;
@@ -456,15 +453,15 @@ static int n2_hmac_async_setkey(struct crypto_ahash *tfm, const u8 *key,
        if (err)
                return err;
 
-       desc.shash.tfm = child_shash;
-       desc.shash.flags = crypto_ahash_get_flags(tfm) &
+       shash->tfm = child_shash;
+       shash->flags = crypto_ahash_get_flags(tfm) &
                CRYPTO_TFM_REQ_MAY_SLEEP;
 
        bs = crypto_shash_blocksize(child_shash);
        ds = crypto_shash_digestsize(child_shash);
        BUG_ON(ds > N2_HASH_KEY_MAX);
        if (keylen > bs) {
-               err = crypto_shash_digest(&desc.shash, key, keylen,
+               err = crypto_shash_digest(shash, key, keylen,
                                          ctx->hash_key);
                if (err)
                        return err;
@@ -2213,7 +2210,6 @@ MODULE_DEVICE_TABLE(of, n2_crypto_match);
 static struct platform_driver n2_crypto_driver = {
        .driver = {
                .name           =       "n2cp",
-               .owner          =       THIS_MODULE,
                .of_match_table =       n2_crypto_match,
        },
        .probe          =       n2_crypto_probe,
@@ -2241,7 +2237,6 @@ MODULE_DEVICE_TABLE(of, n2_mau_match);
 static struct platform_driver n2_mau_driver = {
        .driver = {
                .name           =       "ncp",
-               .owner          =       THIS_MODULE,
                .of_match_table =       n2_mau_match,
        },
        .probe          =       n2_mau_probe,