crypto: Make hifn_795x build depend on !ARCH_DMA_ADDR_T_64BIT
authorRichard Weinberger <richard@nod.at>
Mon, 10 Oct 2011 10:55:41 +0000 (12:55 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Oct 2011 12:28:57 +0000 (14:28 +0200)
hifn_795x works only on 32 bit, remove the detection while loading
the module and catch non-32 bit systems at build time.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/Kconfig
drivers/crypto/hifn_795x.c

index 4ac6d4d2bd1481670db565891056d0db0889466f..6d16b4b0d7a09bb2b2b3d6d77a230401388b89d6 100644 (file)
@@ -200,6 +200,7 @@ config CRYPTO_DEV_HIFN_795X
        select CRYPTO_BLKCIPHER
        select HW_RANDOM if CRYPTO_DEV_HIFN_795X_RNG
        depends on PCI
+       depends on !ARCH_DMA_ADDR_T_64BIT
        help
          This option allows you to have support for HIFN 795x crypto adapters.
 
index a84250a5dd5111f08f79c58c9ff34875b744ff65..fe765f49de589a1229205447e476678da5d0ff6b 100644 (file)
@@ -2744,10 +2744,8 @@ static int __init hifn_init(void)
        unsigned int freq;
        int err;
 
-       if (sizeof(dma_addr_t) > 4) {
-               printk(KERN_INFO "HIFN supports only 32-bit addresses.\n");
-               return -EINVAL;
-       }
+       /* HIFN supports only 32-bit addresses */
+       BUILD_BUG_ON(sizeof(dma_addr_t) != 4);
 
        if (strncmp(hifn_pll_ref, "ext", 3) &&
            strncmp(hifn_pll_ref, "pci", 3)) {