[PATCH] crypto: Make hifn_795x build depend on !ARCH_DMA_ADDR_T_64BIT

October 10th, 2011 - 07:00 am ET by Richard Weinberger | Report spam
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>

drivers/crypto/Kconfig | 1 +
drivers/crypto/hifn_795x.c | 6 ++-
2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index e0b25de..fdbb726 100644
a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -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.

diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index a84250a..fe765f4 100644
a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -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.");
- 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)) {
1.7.7

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
email Follow the discussionReplies 1 replyReplies Make a reply

Replies

#1 Herbert Xu
October 21st, 2011 - 08:40 am ET | Report spam
On Mon, Oct 10, 2011 at 12:55:41PM +0200, Richard Weinberger wrote:
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



Patch applied. Thanks!
Email: Herbert Xu
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Similar topics