X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=crypto%2Finternal.h;h=bd39bfc92eabc1acf465e1cf8614d644eaafb402;hb=0010dd3883b8a5e99c7d4093b97e9e34300a2f03;hp=9ebedae3fb54abc26a97918b3fe7aaabb2b56b82;hpb=591346c9d172daeba44ae8cbe2f9dcb7aa266811;p=karo-tx-linux.git diff --git a/crypto/internal.h b/crypto/internal.h index 9ebedae3fb54..bd39bfc92eab 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)