diff options
Diffstat (limited to 'drivers/crypto/picoxcell_crypto.c')
-rw-r--r-- | drivers/crypto/picoxcell_crypto.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c index a6175ba6d238..5da5b98b8f29 100644 --- a/drivers/crypto/picoxcell_crypto.c +++ b/drivers/crypto/picoxcell_crypto.c | |||
@@ -1720,22 +1720,16 @@ static int spacc_probe(struct platform_device *pdev) | |||
1720 | engine->name = dev_name(&pdev->dev); | 1720 | engine->name = dev_name(&pdev->dev); |
1721 | 1721 | ||
1722 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1722 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1723 | engine->regs = devm_ioremap_resource(&pdev->dev, mem); | ||
1724 | if (IS_ERR(engine->regs)) | ||
1725 | return PTR_ERR(engine->regs); | ||
1726 | |||
1723 | irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 1727 | irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
1724 | if (!mem || !irq) { | 1728 | if (!irq) { |
1725 | dev_err(&pdev->dev, "no memory/irq resource for engine\n"); | 1729 | dev_err(&pdev->dev, "no memory/irq resource for engine\n"); |
1726 | return -ENXIO; | 1730 | return -ENXIO; |
1727 | } | 1731 | } |
1728 | 1732 | ||
1729 | if (!devm_request_mem_region(&pdev->dev, mem->start, resource_size(mem), | ||
1730 | engine->name)) | ||
1731 | return -ENOMEM; | ||
1732 | |||
1733 | engine->regs = devm_ioremap(&pdev->dev, mem->start, resource_size(mem)); | ||
1734 | if (!engine->regs) { | ||
1735 | dev_err(&pdev->dev, "memory map failed\n"); | ||
1736 | return -ENOMEM; | ||
1737 | } | ||
1738 | |||
1739 | if (devm_request_irq(&pdev->dev, irq->start, spacc_spacc_irq, 0, | 1733 | if (devm_request_irq(&pdev->dev, irq->start, spacc_spacc_irq, 0, |
1740 | engine->name, engine)) { | 1734 | engine->name, engine)) { |
1741 | dev_err(engine->dev, "failed to request IRQ\n"); | 1735 | dev_err(engine->dev, "failed to request IRQ\n"); |