diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-01-08 00:58:51 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-05 14:48:11 -0500 |
commit | bed3cd2753d986768a15a6c45b5ae3a56007c1b2 (patch) | |
tree | af4f3e2bc907c7bb3692cf10d51f91b012d08ed4 /drivers/media/platform | |
parent | 03878bb473bb46cf8514223d8c955420b1ef73bc (diff) |
[media] s5p-csis: Use devm_regulator_bulk_get API
devm_regulator_bulk_get is device managed and saves some cleanup
and exit code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/s5p-fimc/mipi-csis.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/platform/s5p-fimc/mipi-csis.c b/drivers/media/platform/s5p-fimc/mipi-csis.c index cde510f0eea6..7e36ad92dd94 100644 --- a/drivers/media/platform/s5p-fimc/mipi-csis.c +++ b/drivers/media/platform/s5p-fimc/mipi-csis.c | |||
@@ -743,7 +743,7 @@ static int s5pcsis_probe(struct platform_device *pdev) | |||
743 | for (i = 0; i < CSIS_NUM_SUPPLIES; i++) | 743 | for (i = 0; i < CSIS_NUM_SUPPLIES; i++) |
744 | state->supplies[i].supply = csis_supply_name[i]; | 744 | state->supplies[i].supply = csis_supply_name[i]; |
745 | 745 | ||
746 | ret = regulator_bulk_get(&pdev->dev, CSIS_NUM_SUPPLIES, | 746 | ret = devm_regulator_bulk_get(&pdev->dev, CSIS_NUM_SUPPLIES, |
747 | state->supplies); | 747 | state->supplies); |
748 | if (ret) | 748 | if (ret) |
749 | return ret; | 749 | return ret; |
@@ -762,7 +762,7 @@ static int s5pcsis_probe(struct platform_device *pdev) | |||
762 | 0, dev_name(&pdev->dev), state); | 762 | 0, dev_name(&pdev->dev), state); |
763 | if (ret) { | 763 | if (ret) { |
764 | dev_err(&pdev->dev, "Interrupt request failed\n"); | 764 | dev_err(&pdev->dev, "Interrupt request failed\n"); |
765 | goto e_regput; | 765 | goto e_clkput; |
766 | } | 766 | } |
767 | 767 | ||
768 | v4l2_subdev_init(&state->sd, &s5pcsis_subdev_ops); | 768 | v4l2_subdev_init(&state->sd, &s5pcsis_subdev_ops); |
@@ -793,8 +793,6 @@ static int s5pcsis_probe(struct platform_device *pdev) | |||
793 | pm_runtime_enable(&pdev->dev); | 793 | pm_runtime_enable(&pdev->dev); |
794 | return 0; | 794 | return 0; |
795 | 795 | ||
796 | e_regput: | ||
797 | regulator_bulk_free(CSIS_NUM_SUPPLIES, state->supplies); | ||
798 | e_clkput: | 796 | e_clkput: |
799 | clk_disable(state->clock[CSIS_CLK_MUX]); | 797 | clk_disable(state->clock[CSIS_CLK_MUX]); |
800 | s5pcsis_clk_put(state); | 798 | s5pcsis_clk_put(state); |
@@ -903,7 +901,6 @@ static int s5pcsis_remove(struct platform_device *pdev) | |||
903 | clk_disable(state->clock[CSIS_CLK_MUX]); | 901 | clk_disable(state->clock[CSIS_CLK_MUX]); |
904 | pm_runtime_set_suspended(&pdev->dev); | 902 | pm_runtime_set_suspended(&pdev->dev); |
905 | s5pcsis_clk_put(state); | 903 | s5pcsis_clk_put(state); |
906 | regulator_bulk_free(CSIS_NUM_SUPPLIES, state->supplies); | ||
907 | 904 | ||
908 | media_entity_cleanup(&state->sd.entity); | 905 | media_entity_cleanup(&state->sd.entity); |
909 | 906 | ||