[CRYPTO] api: Make the crypto subsystem fully modular
authorSebastian Siewior <sebastian@breakpoint.cc>
Sun, 30 Mar 2008 08:36:09 +0000 (16:36 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 21 Apr 2008 02:19:23 +0000 (10:19 +0800)
Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/Kconfig
crypto/Makefile
crypto/api.c
include/linux/crypto.h

index e14ff12750183c611b8079d0d89b0aaa9d6576e7..edd00c5307a4f27e6778f8c21f9bfbc4d3a0af56 100644 (file)
@@ -13,7 +13,7 @@ source "crypto/async_tx/Kconfig"
 # Cryptographic API Configuration
 #
 menuconfig CRYPTO
-       bool "Cryptographic API"
+       tristate "Cryptographic API"
        help
          This option provides the core Cryptographic API.
 
index 6d34bf7ecf8d29864956c41ca6a947b8c6252234..ca024418f4fb6df738f8aab8e71902bebd6bd0a0 100644 (file)
@@ -2,7 +2,8 @@
 # Cryptographic API
 #
 
-obj-$(CONFIG_CRYPTO) += api.o cipher.o digest.o compress.o
+obj-$(CONFIG_CRYPTO) += crypto.o
+crypto-objs := api.o cipher.o digest.o compress.o
 
 crypto_algapi-$(CONFIG_PROC_FS) += proc.o
 crypto_algapi-objs := algapi.o scatterwalk.o $(crypto_algapi-y)
index a2496d1bc6d42234dba6477580a9ddafed6759a9..0a0f41ef255ff4b48e69cebdf26db12157a72c52 100644 (file)
@@ -445,3 +445,6 @@ int crypto_has_alg(const char *name, u32 type, u32 mask)
        return ret;
 }
 EXPORT_SYMBOL_GPL(crypto_has_alg);
+
+MODULE_DESCRIPTION("Cryptographic core API");
+MODULE_LICENSE("GPL");
index 5e02d1b46370c4a9b496359bbbe98eca883b6229..425824bd49f308f64074943fd257bd69f512edce 100644 (file)
@@ -317,14 +317,7 @@ int crypto_unregister_alg(struct crypto_alg *alg);
 /*
  * Algorithm query interface.
  */
-#ifdef CONFIG_CRYPTO
 int crypto_has_alg(const char *name, u32 type, u32 mask);
-#else
-static inline int crypto_has_alg(const char *name, u32 type, u32 mask)
-{
-       return 0;
-}
-#endif
 
 /*
  * Transforms: user-instantiated objects which encapsulate algorithms