crypto: s5p-sss - Use platform_get_irq() instead of _byname()
authorNaveen Krishna Chatradhi <ch.naveen@samsung.com>
Thu, 8 May 2014 13:58:12 +0000 (21:58 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 8 May 2014 13:58:12 +0000 (21:58 +0800)
This patch uses the platform_get_irq() instead of the
platform_get_irq_byname(). Making feeder control interrupt
as resource "0" and hash interrupt as "1".

reasons for this change.
1. Cannot find any Arch which is currently using this driver
2. Samsung Exynos4 and 5 SoCs only use the feeder control interrupt
3. Patches adding support for DT and H/W version are in pipeline

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
CC: David S. Miller <davem@davemloft.net>
CC: <linux-samsung-soc@vger.kernel.org>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/s5p-sss.c

index be45762f390a274f2b916effd52b46fe12fd1619..2876fa37d1f9d428a8f9bdc77a3aa6273c2f8148 100644 (file)
@@ -587,29 +587,29 @@ static int s5p_aes_probe(struct platform_device *pdev)
 
        spin_lock_init(&pdata->lock);
 
-       pdata->irq_hash = platform_get_irq_byname(pdev, "hash");
-       if (pdata->irq_hash < 0) {
-               err = pdata->irq_hash;
-               dev_warn(dev, "hash interrupt is not available.\n");
+       pdata->irq_fc = platform_get_irq(pdev, 0);
+       if (pdata->irq_fc < 0) {
+               err = pdata->irq_fc;
+               dev_warn(dev, "feed control interrupt is not available.\n");
                goto err_irq;
        }
-       err = devm_request_irq(dev, pdata->irq_hash, s5p_aes_interrupt,
+       err = devm_request_irq(dev, pdata->irq_fc, s5p_aes_interrupt,
                               IRQF_SHARED, pdev->name, pdev);
        if (err < 0) {
-               dev_warn(dev, "hash interrupt is not available.\n");
+               dev_warn(dev, "feed control interrupt is not available.\n");
                goto err_irq;
        }
 
-       pdata->irq_fc = platform_get_irq_byname(pdev, "feed control");
-       if (pdata->irq_fc < 0) {
-               err = pdata->irq_fc;
-               dev_warn(dev, "feed control interrupt is not available.\n");
+       pdata->irq_hash = platform_get_irq(pdev, 1);
+       if (pdata->irq_hash < 0) {
+               err = pdata->irq_hash;
+               dev_warn(dev, "hash interrupt is not available.\n");
                goto err_irq;
        }
-       err = devm_request_irq(dev, pdata->irq_fc, s5p_aes_interrupt,
+       err = devm_request_irq(dev, pdata->irq_hash, s5p_aes_interrupt,
                               IRQF_SHARED, pdev->name, pdev);
        if (err < 0) {
-               dev_warn(dev, "feed control interrupt is not available.\n");
+               dev_warn(dev, "hash interrupt is not available.\n");
                goto err_irq;
        }