Skip to content

Commit

Permalink
crypto: api - Export crypto_alg_lookup instead of __crypto_alg_lookup
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
herbertx committed Aug 29, 2008
1 parent b6d4434 commit c51b6c8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions crypto/algapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ void crypto_larval_error(const char *name, u32 type, u32 mask)
{
struct crypto_alg *alg;

down_read(&crypto_alg_sem);
alg = __crypto_alg_lookup(name, type, mask);
up_read(&crypto_alg_sem);
alg = crypto_alg_lookup(name, type, mask);

if (alg) {
if (crypto_is_larval(alg)) {
Expand Down
8 changes: 4 additions & 4 deletions crypto/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ void crypto_mod_put(struct crypto_alg *alg)
}
EXPORT_SYMBOL_GPL(crypto_mod_put);

struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, u32 mask)
static struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type,
u32 mask)
{
struct crypto_alg *q, *alg = NULL;
int best = -2;
Expand Down Expand Up @@ -92,7 +93,6 @@ struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, u32 mask)

return alg;
}
EXPORT_SYMBOL_GPL(__crypto_alg_lookup);

static void crypto_larval_destroy(struct crypto_alg *alg)
{
Expand Down Expand Up @@ -165,8 +165,7 @@ static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg)
return alg;
}

static struct crypto_alg *crypto_alg_lookup(const char *name, u32 type,
u32 mask)
struct crypto_alg *crypto_alg_lookup(const char *name, u32 type, u32 mask)
{
struct crypto_alg *alg;

Expand All @@ -176,6 +175,7 @@ static struct crypto_alg *crypto_alg_lookup(const char *name, u32 type,

return alg;
}
EXPORT_SYMBOL_GPL(crypto_alg_lookup);

struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask)
{
Expand Down
2 changes: 1 addition & 1 deletion crypto/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static inline unsigned int crypto_compress_ctxsize(struct crypto_alg *alg)
}

struct crypto_alg *crypto_mod_get(struct crypto_alg *alg);
struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, u32 mask);
struct crypto_alg *crypto_alg_lookup(const char *name, u32 type, u32 mask);
struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask);

int crypto_init_digest_ops(struct crypto_tfm *tfm);
Expand Down

0 comments on commit c51b6c8

Please sign in to comment.