diff options
author | Archit Taneja <archit@ti.com> | 2013-04-08 04:55:00 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-04-10 08:02:54 -0400 |
commit | b2c9c8ee7cec4c7d8fa90375f9de92ecf3045ebb (patch) | |
tree | 33b24a8d65318bcbaa6036410a7715af283f39d1 /drivers/video/omap2/dss/hdmi.c | |
parent | 3aff5b122b7e01945ba787df306c182bae9f6762 (diff) |
omapdss: use devm_clk_get()
Use devm_clk_get() instead of clk_get() for dss, and for outputs hdmi
and venc. This reduces code and simplifies error handling.
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/hdmi.c')
-rw-r--r-- | drivers/video/omap2/dss/hdmi.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 72923645dcce..c7e0bf748a6d 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c | |||
@@ -804,7 +804,7 @@ static int hdmi_get_clocks(struct platform_device *pdev) | |||
804 | { | 804 | { |
805 | struct clk *clk; | 805 | struct clk *clk; |
806 | 806 | ||
807 | clk = clk_get(&pdev->dev, "sys_clk"); | 807 | clk = devm_clk_get(&pdev->dev, "sys_clk"); |
808 | if (IS_ERR(clk)) { | 808 | if (IS_ERR(clk)) { |
809 | DSSERR("can't get sys_clk\n"); | 809 | DSSERR("can't get sys_clk\n"); |
810 | return PTR_ERR(clk); | 810 | return PTR_ERR(clk); |
@@ -815,12 +815,6 @@ static int hdmi_get_clocks(struct platform_device *pdev) | |||
815 | return 0; | 815 | return 0; |
816 | } | 816 | } |
817 | 817 | ||
818 | static void hdmi_put_clocks(void) | ||
819 | { | ||
820 | if (hdmi.sys_clk) | ||
821 | clk_put(hdmi.sys_clk); | ||
822 | } | ||
823 | |||
824 | #if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO) | 818 | #if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO) |
825 | int hdmi_compute_acr(u32 sample_freq, u32 *n, u32 *cts) | 819 | int hdmi_compute_acr(u32 sample_freq, u32 *n, u32 *cts) |
826 | { | 820 | { |
@@ -1100,7 +1094,7 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev) | |||
1100 | r = hdmi_panel_init(); | 1094 | r = hdmi_panel_init(); |
1101 | if (r) { | 1095 | if (r) { |
1102 | DSSERR("can't init panel\n"); | 1096 | DSSERR("can't init panel\n"); |
1103 | goto err_panel_init; | 1097 | return r; |
1104 | } | 1098 | } |
1105 | 1099 | ||
1106 | dss_debugfs_create_file("hdmi", hdmi_dump_regs); | 1100 | dss_debugfs_create_file("hdmi", hdmi_dump_regs); |
@@ -1110,10 +1104,6 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev) | |||
1110 | hdmi_probe_pdata(pdev); | 1104 | hdmi_probe_pdata(pdev); |
1111 | 1105 | ||
1112 | return 0; | 1106 | return 0; |
1113 | |||
1114 | err_panel_init: | ||
1115 | hdmi_put_clocks(); | ||
1116 | return r; | ||
1117 | } | 1107 | } |
1118 | 1108 | ||
1119 | static int __exit hdmi_remove_child(struct device *dev, void *data) | 1109 | static int __exit hdmi_remove_child(struct device *dev, void *data) |
@@ -1135,8 +1125,6 @@ static int __exit omapdss_hdmihw_remove(struct platform_device *pdev) | |||
1135 | 1125 | ||
1136 | pm_runtime_disable(&pdev->dev); | 1126 | pm_runtime_disable(&pdev->dev); |
1137 | 1127 | ||
1138 | hdmi_put_clocks(); | ||
1139 | |||
1140 | return 0; | 1128 | return 0; |
1141 | } | 1129 | } |
1142 | 1130 | ||