diff options
author | Vaibhav Bedia <vaibhav.bedia@ti.com> | 2011-02-09 08:09:52 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-02-09 17:33:03 -0500 |
commit | d852f446b71b80c59821a08cdb595aa266210daf (patch) | |
tree | cc188c658178da9d7e31556b5aeb34cea759f617 /sound/soc/davinci | |
parent | 36633237be60c0ec88b11e00d5fa22a305563d03 (diff) |
ASoC: Davinci: Use resource_size() helper function
This patch modifies the Davinci i2s and mcasp drivers
to make use of the resource_size() helper function for readability.
Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/davinci')
-rw-r--r-- | sound/soc/davinci/davinci-i2s.c | 6 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index 9e0e565e6ed9..f8c8487aba55 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c | |||
@@ -658,7 +658,7 @@ static int davinci_i2s_probe(struct platform_device *pdev) | |||
658 | return -ENODEV; | 658 | return -ENODEV; |
659 | } | 659 | } |
660 | 660 | ||
661 | ioarea = request_mem_region(mem->start, (mem->end - mem->start) + 1, | 661 | ioarea = request_mem_region(mem->start, resource_size(mem), |
662 | pdev->name); | 662 | pdev->name); |
663 | if (!ioarea) { | 663 | if (!ioarea) { |
664 | dev_err(&pdev->dev, "McBSP region already claimed\n"); | 664 | dev_err(&pdev->dev, "McBSP region already claimed\n"); |
@@ -731,7 +731,7 @@ static int davinci_i2s_probe(struct platform_device *pdev) | |||
731 | err_free_mem: | 731 | err_free_mem: |
732 | kfree(dev); | 732 | kfree(dev); |
733 | err_release_region: | 733 | err_release_region: |
734 | release_mem_region(mem->start, (mem->end - mem->start) + 1); | 734 | release_mem_region(mem->start, resource_size(mem)); |
735 | 735 | ||
736 | return ret; | 736 | return ret; |
737 | } | 737 | } |
@@ -747,7 +747,7 @@ static int davinci_i2s_remove(struct platform_device *pdev) | |||
747 | dev->clk = NULL; | 747 | dev->clk = NULL; |
748 | kfree(dev); | 748 | kfree(dev); |
749 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 749 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
750 | release_mem_region(mem->start, (mem->end - mem->start) + 1); | 750 | release_mem_region(mem->start, resource_size(mem)); |
751 | 751 | ||
752 | return 0; | 752 | return 0; |
753 | } | 753 | } |
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index fb55d2c5d704..9b5d5ca37a97 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c | |||
@@ -868,7 +868,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev) | |||
868 | } | 868 | } |
869 | 869 | ||
870 | ioarea = request_mem_region(mem->start, | 870 | ioarea = request_mem_region(mem->start, |
871 | (mem->end - mem->start) + 1, pdev->name); | 871 | resource_size(mem), pdev->name); |
872 | if (!ioarea) { | 872 | if (!ioarea) { |
873 | dev_err(&pdev->dev, "Audio region already claimed\n"); | 873 | dev_err(&pdev->dev, "Audio region already claimed\n"); |
874 | ret = -EBUSY; | 874 | ret = -EBUSY; |
@@ -933,7 +933,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev) | |||
933 | return 0; | 933 | return 0; |
934 | 934 | ||
935 | err_release_region: | 935 | err_release_region: |
936 | release_mem_region(mem->start, (mem->end - mem->start) + 1); | 936 | release_mem_region(mem->start, resource_size(mem)); |
937 | err_release_data: | 937 | err_release_data: |
938 | kfree(dev); | 938 | kfree(dev); |
939 | 939 | ||
@@ -951,7 +951,7 @@ static int davinci_mcasp_remove(struct platform_device *pdev) | |||
951 | dev->clk = NULL; | 951 | dev->clk = NULL; |
952 | 952 | ||
953 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 953 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
954 | release_mem_region(mem->start, (mem->end - mem->start) + 1); | 954 | release_mem_region(mem->start, resource_size(mem)); |
955 | 955 | ||
956 | kfree(dev); | 956 | kfree(dev); |
957 | 957 | ||