diff options
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 28d41d16b7be..36de3fedc3f6 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -5073,7 +5073,7 @@ static int dsi_get_clocks(struct platform_device *dsidev) | |||
5073 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); | 5073 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); |
5074 | struct clk *clk; | 5074 | struct clk *clk; |
5075 | 5075 | ||
5076 | clk = clk_get(&dsidev->dev, "fck"); | 5076 | clk = devm_clk_get(&dsidev->dev, "fck"); |
5077 | if (IS_ERR(clk)) { | 5077 | if (IS_ERR(clk)) { |
5078 | DSSERR("can't get fck\n"); | 5078 | DSSERR("can't get fck\n"); |
5079 | return PTR_ERR(clk); | 5079 | return PTR_ERR(clk); |
@@ -5081,11 +5081,9 @@ static int dsi_get_clocks(struct platform_device *dsidev) | |||
5081 | 5081 | ||
5082 | dsi->dss_clk = clk; | 5082 | dsi->dss_clk = clk; |
5083 | 5083 | ||
5084 | clk = clk_get(&dsidev->dev, "sys_clk"); | 5084 | clk = devm_clk_get(&dsidev->dev, "sys_clk"); |
5085 | if (IS_ERR(clk)) { | 5085 | if (IS_ERR(clk)) { |
5086 | DSSERR("can't get sys_clk\n"); | 5086 | DSSERR("can't get sys_clk\n"); |
5087 | clk_put(dsi->dss_clk); | ||
5088 | dsi->dss_clk = NULL; | ||
5089 | return PTR_ERR(clk); | 5087 | return PTR_ERR(clk); |
5090 | } | 5088 | } |
5091 | 5089 | ||
@@ -5094,16 +5092,6 @@ static int dsi_get_clocks(struct platform_device *dsidev) | |||
5094 | return 0; | 5092 | return 0; |
5095 | } | 5093 | } |
5096 | 5094 | ||
5097 | static void dsi_put_clocks(struct platform_device *dsidev) | ||
5098 | { | ||
5099 | struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); | ||
5100 | |||
5101 | if (dsi->dss_clk) | ||
5102 | clk_put(dsi->dss_clk); | ||
5103 | if (dsi->sys_clk) | ||
5104 | clk_put(dsi->sys_clk); | ||
5105 | } | ||
5106 | |||
5107 | static struct omap_dss_device * __init dsi_find_dssdev(struct platform_device *pdev) | 5095 | static struct omap_dss_device * __init dsi_find_dssdev(struct platform_device *pdev) |
5108 | { | 5096 | { |
5109 | struct omap_dss_board_info *pdata = pdev->dev.platform_data; | 5097 | struct omap_dss_board_info *pdata = pdev->dev.platform_data; |
@@ -5314,7 +5302,6 @@ static int __init omap_dsihw_probe(struct platform_device *dsidev) | |||
5314 | 5302 | ||
5315 | err_runtime_get: | 5303 | err_runtime_get: |
5316 | pm_runtime_disable(&dsidev->dev); | 5304 | pm_runtime_disable(&dsidev->dev); |
5317 | dsi_put_clocks(dsidev); | ||
5318 | return r; | 5305 | return r; |
5319 | } | 5306 | } |
5320 | 5307 | ||
@@ -5330,8 +5317,6 @@ static int __exit omap_dsihw_remove(struct platform_device *dsidev) | |||
5330 | 5317 | ||
5331 | pm_runtime_disable(&dsidev->dev); | 5318 | pm_runtime_disable(&dsidev->dev); |
5332 | 5319 | ||
5333 | dsi_put_clocks(dsidev); | ||
5334 | |||
5335 | if (dsi->vdds_dsi_reg != NULL) { | 5320 | if (dsi->vdds_dsi_reg != NULL) { |
5336 | if (dsi->vdds_dsi_enabled) { | 5321 | if (dsi->vdds_dsi_enabled) { |
5337 | regulator_disable(dsi->vdds_dsi_reg); | 5322 | regulator_disable(dsi->vdds_dsi_reg); |