From 8084600ca78354fad147593256b9e32ef5d15148 Mon Sep 17 00:00:00 2001 From: "Mark A. Greer" Date: Tue, 11 Dec 2012 21:09:58 -0700 Subject: [PATCH 08/10] crypto: omap4-aes: Don't use hardcoded base address The omap4-aes driver currently uses a hardcoded base address for its register set instead of the address passed in by the system. Instead, use the address passed in by the system. Signed-off-by: Mark A. Greer --- drivers/crypto/omap4-aes.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/omap4-aes.c b/drivers/crypto/omap4-aes.c index 941b8a1..984a15e 100644 --- a/drivers/crypto/omap4-aes.c +++ b/drivers/crypto/omap4-aes.c @@ -800,15 +800,13 @@ static int omap4_aes_probe(struct platform_device *pdev) crypto_init_queue(&dd->queue, AM33X_AES_QUEUE_LENGTH); /* Get the base address */ - //res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - //if (!res) { - // dev_err(dev, "invalid resource type\n"); - // err = -ENODEV; - // goto err_res; - //} - - //dd->phys_base = res->start; - dd->phys_base = AM33XX_AES0_P_BASE; + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) { + dev_err(dev, "invalid resource type\n"); + err = -ENODEV; + goto err_data; + } + dd->phys_base = res->start; /* Get the DMA */ res = platform_get_resource(pdev, IORESOURCE_DMA, 0); -- 1.7.12