This source file includes following definitions.
- acomp_request_ctx
- acomp_tfm_ctx
- acomp_request_complete
- acomp_alg_name
- __acomp_request_alloc
- __acomp_request_free
1
2
3
4
5
6
7
8
9 #ifndef _CRYPTO_ACOMP_INT_H
10 #define _CRYPTO_ACOMP_INT_H
11 #include <crypto/acompress.h>
12
13
14
15
16 static inline void *acomp_request_ctx(struct acomp_req *req)
17 {
18 return req->__ctx;
19 }
20
21 static inline void *acomp_tfm_ctx(struct crypto_acomp *tfm)
22 {
23 return tfm->base.__crt_ctx;
24 }
25
26 static inline void acomp_request_complete(struct acomp_req *req,
27 int err)
28 {
29 req->base.complete(&req->base, err);
30 }
31
32 static inline const char *acomp_alg_name(struct crypto_acomp *tfm)
33 {
34 return crypto_acomp_tfm(tfm)->__crt_alg->cra_name;
35 }
36
37 static inline struct acomp_req *__acomp_request_alloc(struct crypto_acomp *tfm)
38 {
39 struct acomp_req *req;
40
41 req = kzalloc(sizeof(*req) + crypto_acomp_reqsize(tfm), GFP_KERNEL);
42 if (likely(req))
43 acomp_request_set_tfm(req, tfm);
44 return req;
45 }
46
47 static inline void __acomp_request_free(struct acomp_req *req)
48 {
49 kzfree(req);
50 }
51
52
53
54
55
56
57
58
59
60
61
62 int crypto_register_acomp(struct acomp_alg *alg);
63
64
65
66
67
68
69
70
71
72
73
74 int crypto_unregister_acomp(struct acomp_alg *alg);
75
76 int crypto_register_acomps(struct acomp_alg *algs, int count);
77 void crypto_unregister_acomps(struct acomp_alg *algs, int count);
78
79 #endif