X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=crypto%2Finternal.h;h=bd39bfc92eabc1acf465e1cf8614d644eaafb402;hb=ee1a8d402e7e204d57fb108aa40003b6d1633036;hp=9ebedae3fb54abc26a97918b3fe7aaabb2b56b82;hpb=ad54e461137765aaf090eb7f54c3b51fc0ad5d62;p=~andy%2Flinux diff --git a/crypto/internal.h b/crypto/internal.h index 9ebedae3fb5..bd39bfc92ea 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -103,6 +103,12 @@ int crypto_register_notifier(struct notifier_block *nb); int crypto_unregister_notifier(struct notifier_block *nb); int crypto_probing_notify(unsigned long val, void *v); +static inline struct crypto_alg *crypto_alg_get(struct crypto_alg *alg) +{ + atomic_inc(&alg->cra_refcnt); + return alg; +} + static inline void crypto_alg_put(struct crypto_alg *alg) { if (atomic_dec_and_test(&alg->cra_refcnt) && alg->cra_destroy)