X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=crypto%2Finternal.h;h=bd39bfc92eabc1acf465e1cf8614d644eaafb402;hb=4b30f07e74d2df673925019ad58bc59a719df3bb;hp=9ebedae3fb54abc26a97918b3fe7aaabb2b56b82;hpb=56e6a08154eb2e80a339b04ca9800273c96b33fc;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git diff --git a/crypto/internal.h b/crypto/internal.h index 9ebedae..bd39bfc 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)