diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2008-08-03 23:44:59 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2008-08-29 01:48:55 -0400 |
commit | c51b6c8102a82239163c8c04e404c7cc2857b4be (patch) | |
tree | 58d3a82d5e1662f99f61e05be6375d8e4fa6023d | |
parent | b6d44341864b50a308f932c39f03fb8ad5efb021 (diff) |
crypto: api - Export crypto_alg_lookup instead of __crypto_alg_lookup
Since the only user of __crypto_alg_lookup is doing exactly what
crypto_alg_lookup does, we can now the latter in lieu of the former.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | crypto/algapi.c | 4 | ||||
-rw-r--r-- | crypto/api.c | 8 | ||||
-rw-r--r-- | crypto/internal.h | 2 |
3 files changed, 6 insertions, 8 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c index e65cb50cf4af..e9154c1347ca 100644 --- a/crypto/algapi.c +++ b/crypto/algapi.c | |||
@@ -27,9 +27,7 @@ void crypto_larval_error(const char *name, u32 type, u32 mask) | |||
27 | { | 27 | { |
28 | struct crypto_alg *alg; | 28 | struct crypto_alg *alg; |
29 | 29 | ||
30 | down_read(&crypto_alg_sem); | 30 | alg = crypto_alg_lookup(name, type, mask); |
31 | alg = __crypto_alg_lookup(name, type, mask); | ||
32 | up_read(&crypto_alg_sem); | ||
33 | 31 | ||
34 | if (alg) { | 32 | if (alg) { |
35 | if (crypto_is_larval(alg)) { | 33 | if (crypto_is_larval(alg)) { |
diff --git a/crypto/api.c b/crypto/api.c index d06e33270abe..0906cedd4521 100644 --- a/crypto/api.c +++ b/crypto/api.c | |||
@@ -55,7 +55,8 @@ void crypto_mod_put(struct crypto_alg *alg) | |||
55 | } | 55 | } |
56 | EXPORT_SYMBOL_GPL(crypto_mod_put); | 56 | EXPORT_SYMBOL_GPL(crypto_mod_put); |
57 | 57 | ||
58 | struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, u32 mask) | 58 | static struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, |
59 | u32 mask) | ||
59 | { | 60 | { |
60 | struct crypto_alg *q, *alg = NULL; | 61 | struct crypto_alg *q, *alg = NULL; |
61 | int best = -2; | 62 | int best = -2; |
@@ -92,7 +93,6 @@ struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, u32 mask) | |||
92 | 93 | ||
93 | return alg; | 94 | return alg; |
94 | } | 95 | } |
95 | EXPORT_SYMBOL_GPL(__crypto_alg_lookup); | ||
96 | 96 | ||
97 | static void crypto_larval_destroy(struct crypto_alg *alg) | 97 | static void crypto_larval_destroy(struct crypto_alg *alg) |
98 | { | 98 | { |
@@ -165,8 +165,7 @@ static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg) | |||
165 | return alg; | 165 | return alg; |
166 | } | 166 | } |
167 | 167 | ||
168 | static struct crypto_alg *crypto_alg_lookup(const char *name, u32 type, | 168 | struct crypto_alg *crypto_alg_lookup(const char *name, u32 type, u32 mask) |
169 | u32 mask) | ||
170 | { | 169 | { |
171 | struct crypto_alg *alg; | 170 | struct crypto_alg *alg; |
172 | 171 | ||
@@ -176,6 +175,7 @@ static struct crypto_alg *crypto_alg_lookup(const char *name, u32 type, | |||
176 | 175 | ||
177 | return alg; | 176 | return alg; |
178 | } | 177 | } |
178 | EXPORT_SYMBOL_GPL(crypto_alg_lookup); | ||
179 | 179 | ||
180 | struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask) | 180 | struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask) |
181 | { | 181 | { |
diff --git a/crypto/internal.h b/crypto/internal.h index 683fcb2d91f4..6d8d21310585 100644 --- a/crypto/internal.h +++ b/crypto/internal.h | |||
@@ -82,7 +82,7 @@ static inline unsigned int crypto_compress_ctxsize(struct crypto_alg *alg) | |||
82 | } | 82 | } |
83 | 83 | ||
84 | struct crypto_alg *crypto_mod_get(struct crypto_alg *alg); | 84 | struct crypto_alg *crypto_mod_get(struct crypto_alg *alg); |
85 | struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, u32 mask); | 85 | struct crypto_alg *crypto_alg_lookup(const char *name, u32 type, u32 mask); |
86 | struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask); | 86 | struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask); |
87 | 87 | ||
88 | int crypto_init_digest_ops(struct crypto_tfm *tfm); | 88 | int crypto_init_digest_ops(struct crypto_tfm *tfm); |