diff options
Diffstat (limited to 'drivers/video/omap2/dss/dss.c')
-rw-r--r-- | drivers/video/omap2/dss/dss.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 054c2a22b3f1..645b3bc12ede 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c | |||
@@ -767,13 +767,11 @@ int dss_dpi_select_source(enum omap_channel channel) | |||
767 | static int dss_get_clocks(void) | 767 | static int dss_get_clocks(void) |
768 | { | 768 | { |
769 | struct clk *clk; | 769 | struct clk *clk; |
770 | int r; | ||
771 | 770 | ||
772 | clk = clk_get(&dss.pdev->dev, "fck"); | 771 | clk = devm_clk_get(&dss.pdev->dev, "fck"); |
773 | if (IS_ERR(clk)) { | 772 | if (IS_ERR(clk)) { |
774 | DSSERR("can't get clock fck\n"); | 773 | DSSERR("can't get clock fck\n"); |
775 | r = PTR_ERR(clk); | 774 | return PTR_ERR(clk); |
776 | goto err; | ||
777 | } | 775 | } |
778 | 776 | ||
779 | dss.dss_clk = clk; | 777 | dss.dss_clk = clk; |
@@ -782,8 +780,7 @@ static int dss_get_clocks(void) | |||
782 | clk = clk_get(NULL, dss.feat->clk_name); | 780 | clk = clk_get(NULL, dss.feat->clk_name); |
783 | if (IS_ERR(clk)) { | 781 | if (IS_ERR(clk)) { |
784 | DSSERR("Failed to get %s\n", dss.feat->clk_name); | 782 | DSSERR("Failed to get %s\n", dss.feat->clk_name); |
785 | r = PTR_ERR(clk); | 783 | return PTR_ERR(clk); |
786 | goto err; | ||
787 | } | 784 | } |
788 | } else { | 785 | } else { |
789 | clk = NULL; | 786 | clk = NULL; |
@@ -792,21 +789,12 @@ static int dss_get_clocks(void) | |||
792 | dss.dpll4_m4_ck = clk; | 789 | dss.dpll4_m4_ck = clk; |
793 | 790 | ||
794 | return 0; | 791 | return 0; |
795 | |||
796 | err: | ||
797 | if (dss.dss_clk) | ||
798 | clk_put(dss.dss_clk); | ||
799 | if (dss.dpll4_m4_ck) | ||
800 | clk_put(dss.dpll4_m4_ck); | ||
801 | |||
802 | return r; | ||
803 | } | 792 | } |
804 | 793 | ||
805 | static void dss_put_clocks(void) | 794 | static void dss_put_clocks(void) |
806 | { | 795 | { |
807 | if (dss.dpll4_m4_ck) | 796 | if (dss.dpll4_m4_ck) |
808 | clk_put(dss.dpll4_m4_ck); | 797 | clk_put(dss.dpll4_m4_ck); |
809 | clk_put(dss.dss_clk); | ||
810 | } | 798 | } |
811 | 799 | ||
812 | static int dss_runtime_get(void) | 800 | static int dss_runtime_get(void) |