mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
crypto: api - Add instance free function to crypto_type
Currently the task of freeing an instance is given to the crypto template. However, it has no type information on the instance so we have to resort to checking type information at runtime. This patch introduces a free function to crypto_type that will be used to free an instance. This can then be used to free an instance in a type-safe manner. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
23ad69aafe
commit
319382a697
2 changed files with 14 additions and 2 deletions
|
@ -18,6 +18,7 @@
|
|||
#include <linux/skbuff.h>
|
||||
|
||||
struct crypto_aead;
|
||||
struct crypto_instance;
|
||||
struct module;
|
||||
struct rtattr;
|
||||
struct seq_file;
|
||||
|
@ -30,6 +31,7 @@ struct crypto_type {
|
|||
void (*show)(struct seq_file *m, struct crypto_alg *alg);
|
||||
int (*report)(struct sk_buff *skb, struct crypto_alg *alg);
|
||||
struct crypto_alg *(*lookup)(const char *name, u32 type, u32 mask);
|
||||
void (*free)(struct crypto_instance *inst);
|
||||
|
||||
unsigned int type;
|
||||
unsigned int maskclear;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue