aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/mxs/mxs-saif.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/mxs/mxs-saif.c')
-rw-r--r--sound/soc/mxs/mxs-saif.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index 401944cf4560..76dc74d24fc2 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -617,7 +617,7 @@ static irqreturn_t mxs_saif_irq(int irq, void *dev_id)
617 617
618static int mxs_saif_probe(struct platform_device *pdev) 618static int mxs_saif_probe(struct platform_device *pdev)
619{ 619{
620 struct resource *res; 620 struct resource *iores, *dmares;
621 struct mxs_saif *saif; 621 struct mxs_saif *saif;
622 struct mxs_saif_platform_data *pdata; 622 struct mxs_saif_platform_data *pdata;
623 int ret = 0; 623 int ret = 0;
@@ -655,35 +655,36 @@ static int mxs_saif_probe(struct platform_device *pdev)
655 goto failed_clk; 655 goto failed_clk;
656 } 656 }
657 657
658 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 658 iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
659 if (!res) { 659 if (!iores) {
660 ret = -ENODEV; 660 ret = -ENODEV;
661 dev_err(&pdev->dev, "failed to get io resource: %d\n", 661 dev_err(&pdev->dev, "failed to get io resource: %d\n",
662 ret); 662 ret);
663 goto failed_get_resource; 663 goto failed_get_resource;
664 } 664 }
665 665
666 if (!request_mem_region(res->start, resource_size(res), "mxs-saif")) { 666 if (!request_mem_region(iores->start, resource_size(iores),
667 "mxs-saif")) {
667 dev_err(&pdev->dev, "request_mem_region failed\n"); 668 dev_err(&pdev->dev, "request_mem_region failed\n");
668 ret = -EBUSY; 669 ret = -EBUSY;
669 goto failed_get_resource; 670 goto failed_get_resource;
670 } 671 }
671 672
672 saif->base = ioremap(res->start, resource_size(res)); 673 saif->base = ioremap(iores->start, resource_size(iores));
673 if (!saif->base) { 674 if (!saif->base) {
674 dev_err(&pdev->dev, "ioremap failed\n"); 675 dev_err(&pdev->dev, "ioremap failed\n");
675 ret = -ENODEV; 676 ret = -ENODEV;
676 goto failed_ioremap; 677 goto failed_ioremap;
677 } 678 }
678 679
679 res = platform_get_resource(pdev, IORESOURCE_DMA, 0); 680 dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0);
680 if (!res) { 681 if (!dmares) {
681 ret = -ENODEV; 682 ret = -ENODEV;
682 dev_err(&pdev->dev, "failed to get dma resource: %d\n", 683 dev_err(&pdev->dev, "failed to get dma resource: %d\n",
683 ret); 684 ret);
684 goto failed_ioremap; 685 goto failed_ioremap;
685 } 686 }
686 saif->dma_param.chan_num = res->start; 687 saif->dma_param.chan_num = dmares->start;
687 688
688 saif->irq = platform_get_irq(pdev, 0); 689 saif->irq = platform_get_irq(pdev, 0);
689 if (saif->irq < 0) { 690 if (saif->irq < 0) {
@@ -742,7 +743,7 @@ failed_get_irq2:
742failed_get_irq1: 743failed_get_irq1:
743 iounmap(saif->base); 744 iounmap(saif->base);
744failed_ioremap: 745failed_ioremap:
745 release_mem_region(res->start, resource_size(res)); 746 release_mem_region(iores->start, resource_size(iores));
746failed_get_resource: 747failed_get_resource:
747 clk_put(saif->clk); 748 clk_put(saif->clk);
748failed_clk: 749failed_clk: