aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/ux500
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-09-22 11:26:27 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-09-22 11:26:27 -0400
commitddfb43f3881edb47aa0083651ad31983cdc42c33 (patch)
tree7128cb13b599d2903a4deb05bbae37508b1c261e /sound/soc/ux500
parent2d6d649a2e0fa0268c0d03d5b1d330ca7907d33c (diff)
parent5698bd757d55b1bb87edd1a9744ab09c142abfc2 (diff)
Merge tag 'v3.6-rc6' into for-3.7
Linux 3.6-rc6 has all our bug fixes. Conflicts (trivial overlap): sound/soc/omap/am3517evm.c
Diffstat (limited to 'sound/soc/ux500')
-rw-r--r--sound/soc/ux500/ux500_msp_i2s.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/sound/soc/ux500/ux500_msp_i2s.c b/sound/soc/ux500/ux500_msp_i2s.c
index 36be11e47ad6..1b7c2f58ce13 100644
--- a/sound/soc/ux500/ux500_msp_i2s.c
+++ b/sound/soc/ux500/ux500_msp_i2s.c
@@ -663,7 +663,6 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev,
663 struct ux500_msp **msp_p, 663 struct ux500_msp **msp_p,
664 struct msp_i2s_platform_data *platform_data) 664 struct msp_i2s_platform_data *platform_data)
665{ 665{
666 int ret = 0;
667 struct resource *res = NULL; 666 struct resource *res = NULL;
668 struct i2s_controller *i2s_cont; 667 struct i2s_controller *i2s_cont;
669 struct ux500_msp *msp; 668 struct ux500_msp *msp;
@@ -687,15 +686,14 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev,
687 if (res == NULL) { 686 if (res == NULL) {
688 dev_err(&pdev->dev, "%s: ERROR: Unable to get resource!\n", 687 dev_err(&pdev->dev, "%s: ERROR: Unable to get resource!\n",
689 __func__); 688 __func__);
690 ret = -ENOMEM; 689 return -ENOMEM;
691 goto err_res;
692 } 690 }
693 691
694 msp->registers = ioremap(res->start, (res->end - res->start + 1)); 692 msp->registers = devm_ioremap(&pdev->dev, res->start,
693 resource_size(res));
695 if (msp->registers == NULL) { 694 if (msp->registers == NULL) {
696 dev_err(&pdev->dev, "%s: ERROR: ioremap failed!\n", __func__); 695 dev_err(&pdev->dev, "%s: ERROR: ioremap failed!\n", __func__);
697 ret = -ENOMEM; 696 return -ENOMEM;
698 goto err_res;
699 } 697 }
700 698
701 msp->msp_state = MSP_STATE_IDLE; 699 msp->msp_state = MSP_STATE_IDLE;
@@ -707,7 +705,7 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev,
707 dev_err(&pdev->dev, 705 dev_err(&pdev->dev,
708 "%s: ERROR: Failed to allocate I2S-controller!\n", 706 "%s: ERROR: Failed to allocate I2S-controller!\n",
709 __func__); 707 __func__);
710 goto err_i2s_cont; 708 return -ENOMEM;
711 } 709 }
712 i2s_cont->dev.parent = &pdev->dev; 710 i2s_cont->dev.parent = &pdev->dev;
713 i2s_cont->data = (void *)msp; 711 i2s_cont->data = (void *)msp;
@@ -718,14 +716,6 @@ int ux500_msp_i2s_init_msp(struct platform_device *pdev,
718 msp->i2s_cont = i2s_cont; 716 msp->i2s_cont = i2s_cont;
719 717
720 return 0; 718 return 0;
721
722err_i2s_cont:
723 iounmap(msp->registers);
724
725err_res:
726 devm_kfree(&pdev->dev, msp);
727
728 return ret;
729} 719}
730 720
731void ux500_msp_i2s_cleanup_msp(struct platform_device *pdev, 721void ux500_msp_i2s_cleanup_msp(struct platform_device *pdev,
@@ -734,11 +724,6 @@ void ux500_msp_i2s_cleanup_msp(struct platform_device *pdev,
734 dev_dbg(msp->dev, "%s: Enter (id = %d).\n", __func__, msp->id); 724 dev_dbg(msp->dev, "%s: Enter (id = %d).\n", __func__, msp->id);
735 725
736 device_unregister(&msp->i2s_cont->dev); 726 device_unregister(&msp->i2s_cont->dev);
737 devm_kfree(&pdev->dev, msp->i2s_cont);
738
739 iounmap(msp->registers);
740
741 devm_kfree(&pdev->dev, msp);
742} 727}
743 728
744MODULE_LICENSE("GPL v2"); 729MODULE_LICENSE("GPL v2");