aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/fsi.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-09-22 12:31:08 -0400
committerTakashi Iwai <tiwai@suse.de>2012-09-22 12:31:08 -0400
commit3d98c21d064bfbb8c6fddc659471acb4950320fa (patch)
treea506fbe4cca3616f328cdf761a45d0a09ce38237 /sound/soc/sh/fsi.c
parent99df18b31db389ec6abc8ad5415c14e7bb752b58 (diff)
parentddfb43f3881edb47aa0083651ad31983cdc42c33 (diff)
Merge tag 'asoc-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v3.7 Lots and lots of driver specific cleanups and enhancements but the only substantial framework feature this time round is the compressed API binding: - Addition of ASoC bindings for the compressed API, used by the mid-x86 drivers. - Lots of cleanups and API refreshes for CODEC drivers and DaVinci. - Conversion of OMAP to dmaengine. - New machine driver for Wolfson Microelectronics Bells. - New CODEC driver for Wolfson Microelectronics WM0010.
Diffstat (limited to 'sound/soc/sh/fsi.c')
-rw-r--r--sound/soc/sh/fsi.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 0540408a9fa9..5328ae5539f1 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -1655,22 +1655,20 @@ static int fsi_probe(struct platform_device *pdev)
1655 irq = platform_get_irq(pdev, 0); 1655 irq = platform_get_irq(pdev, 0);
1656 if (!res || (int)irq <= 0) { 1656 if (!res || (int)irq <= 0) {
1657 dev_err(&pdev->dev, "Not enough FSI platform resources.\n"); 1657 dev_err(&pdev->dev, "Not enough FSI platform resources.\n");
1658 ret = -ENODEV; 1658 return -ENODEV;
1659 goto exit;
1660 } 1659 }
1661 1660
1662 master = kzalloc(sizeof(*master), GFP_KERNEL); 1661 master = devm_kzalloc(&pdev->dev, sizeof(*master), GFP_KERNEL);
1663 if (!master) { 1662 if (!master) {
1664 dev_err(&pdev->dev, "Could not allocate master\n"); 1663 dev_err(&pdev->dev, "Could not allocate master\n");
1665 ret = -ENOMEM; 1664 return -ENOMEM;
1666 goto exit;
1667 } 1665 }
1668 1666
1669 master->base = ioremap_nocache(res->start, resource_size(res)); 1667 master->base = devm_ioremap_nocache(&pdev->dev,
1668 res->start, resource_size(res));
1670 if (!master->base) { 1669 if (!master->base) {
1671 ret = -ENXIO;
1672 dev_err(&pdev->dev, "Unable to ioremap FSI registers.\n"); 1670 dev_err(&pdev->dev, "Unable to ioremap FSI registers.\n");
1673 goto exit_kfree; 1671 return -ENXIO;
1674 } 1672 }
1675 1673
1676 /* master setting */ 1674 /* master setting */
@@ -1686,7 +1684,7 @@ static int fsi_probe(struct platform_device *pdev)
1686 ret = fsi_stream_probe(&master->fsia, &pdev->dev); 1684 ret = fsi_stream_probe(&master->fsia, &pdev->dev);
1687 if (ret < 0) { 1685 if (ret < 0) {
1688 dev_err(&pdev->dev, "FSIA stream probe failed\n"); 1686 dev_err(&pdev->dev, "FSIA stream probe failed\n");
1689 goto exit_iounmap; 1687 return ret;
1690 } 1688 }
1691 1689
1692 /* FSI B setting */ 1690 /* FSI B setting */
@@ -1730,16 +1728,11 @@ exit_snd_soc:
1730exit_free_irq: 1728exit_free_irq:
1731 free_irq(irq, master); 1729 free_irq(irq, master);
1732exit_fsib: 1730exit_fsib:
1731 pm_runtime_disable(&pdev->dev);
1733 fsi_stream_remove(&master->fsib); 1732 fsi_stream_remove(&master->fsib);
1734exit_fsia: 1733exit_fsia:
1735 fsi_stream_remove(&master->fsia); 1734 fsi_stream_remove(&master->fsia);
1736exit_iounmap: 1735
1737 iounmap(master->base);
1738 pm_runtime_disable(&pdev->dev);
1739exit_kfree:
1740 kfree(master);
1741 master = NULL;
1742exit:
1743 return ret; 1736 return ret;
1744} 1737}
1745 1738
@@ -1758,9 +1751,6 @@ static int fsi_remove(struct platform_device *pdev)
1758 fsi_stream_remove(&master->fsia); 1751 fsi_stream_remove(&master->fsia);
1759 fsi_stream_remove(&master->fsib); 1752 fsi_stream_remove(&master->fsib);
1760 1753
1761 iounmap(master->base);
1762 kfree(master);
1763
1764 return 0; 1754 return 0;
1765} 1755}
1766 1756