Loading sound/soc/mxs/mxs-saif.c +7 −13 Original line number Diff line number Diff line Loading @@ -704,7 +704,7 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) return ret; } saif->clk = clk_get(&pdev->dev, NULL); saif->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(saif->clk)) { ret = PTR_ERR(saif->clk); dev_err(&pdev->dev, "Cannot get the clock: %d\n", Loading @@ -717,8 +717,7 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) saif->base = devm_request_and_ioremap(&pdev->dev, iores); if (!saif->base) { dev_err(&pdev->dev, "ioremap failed\n"); ret = -ENODEV; goto failed_get_resource; return -ENODEV; } dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0); Loading @@ -731,7 +730,7 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) &saif->dma_param.chan_num); if (ret) { dev_err(&pdev->dev, "failed to get dma channel\n"); goto failed_get_resource; return ret; } } else { saif->dma_param.chan_num = dmares->start; Loading @@ -742,7 +741,7 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) ret = saif->irq; dev_err(&pdev->dev, "failed to get irq resource: %d\n", ret); goto failed_get_resource; return ret; } saif->dev = &pdev->dev; Loading @@ -750,7 +749,7 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) "mxs-saif", saif); if (ret) { dev_err(&pdev->dev, "failed to request irq\n"); goto failed_get_resource; return ret; } saif->dma_param.chan_irq = platform_get_irq(pdev, 1); Loading @@ -758,7 +757,7 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) ret = saif->dma_param.chan_irq; dev_err(&pdev->dev, "failed to get dma irq resource: %d\n", ret); goto failed_get_resource; return ret; } platform_set_drvdata(pdev, saif); Loading @@ -766,7 +765,7 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) ret = snd_soc_register_dai(&pdev->dev, &mxs_saif_dai); if (ret) { dev_err(&pdev->dev, "register DAI failed\n"); goto failed_get_resource; return ret; } ret = mxs_pcm_platform_register(&pdev->dev); Loading @@ -779,19 +778,14 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) failed_pdev_alloc: snd_soc_unregister_dai(&pdev->dev); failed_get_resource: clk_put(saif->clk); return ret; } static int __devexit mxs_saif_remove(struct platform_device *pdev) { struct mxs_saif *saif = platform_get_drvdata(pdev); mxs_pcm_platform_unregister(&pdev->dev); snd_soc_unregister_dai(&pdev->dev); clk_put(saif->clk); return 0; } Loading Loading
sound/soc/mxs/mxs-saif.c +7 −13 Original line number Diff line number Diff line Loading @@ -704,7 +704,7 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) return ret; } saif->clk = clk_get(&pdev->dev, NULL); saif->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(saif->clk)) { ret = PTR_ERR(saif->clk); dev_err(&pdev->dev, "Cannot get the clock: %d\n", Loading @@ -717,8 +717,7 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) saif->base = devm_request_and_ioremap(&pdev->dev, iores); if (!saif->base) { dev_err(&pdev->dev, "ioremap failed\n"); ret = -ENODEV; goto failed_get_resource; return -ENODEV; } dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0); Loading @@ -731,7 +730,7 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) &saif->dma_param.chan_num); if (ret) { dev_err(&pdev->dev, "failed to get dma channel\n"); goto failed_get_resource; return ret; } } else { saif->dma_param.chan_num = dmares->start; Loading @@ -742,7 +741,7 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) ret = saif->irq; dev_err(&pdev->dev, "failed to get irq resource: %d\n", ret); goto failed_get_resource; return ret; } saif->dev = &pdev->dev; Loading @@ -750,7 +749,7 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) "mxs-saif", saif); if (ret) { dev_err(&pdev->dev, "failed to request irq\n"); goto failed_get_resource; return ret; } saif->dma_param.chan_irq = platform_get_irq(pdev, 1); Loading @@ -758,7 +757,7 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) ret = saif->dma_param.chan_irq; dev_err(&pdev->dev, "failed to get dma irq resource: %d\n", ret); goto failed_get_resource; return ret; } platform_set_drvdata(pdev, saif); Loading @@ -766,7 +765,7 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) ret = snd_soc_register_dai(&pdev->dev, &mxs_saif_dai); if (ret) { dev_err(&pdev->dev, "register DAI failed\n"); goto failed_get_resource; return ret; } ret = mxs_pcm_platform_register(&pdev->dev); Loading @@ -779,19 +778,14 @@ static int __devinit mxs_saif_probe(struct platform_device *pdev) failed_pdev_alloc: snd_soc_unregister_dai(&pdev->dev); failed_get_resource: clk_put(saif->clk); return ret; } static int __devexit mxs_saif_remove(struct platform_device *pdev) { struct mxs_saif *saif = platform_get_drvdata(pdev); mxs_pcm_platform_unregister(&pdev->dev); snd_soc_unregister_dai(&pdev->dev); clk_put(saif->clk); return 0; } Loading