History

[media] V4L2: platform: rcar_jpu: switch off clock on release later

Give JPU peripheral chance to finish current job. Don't switch off clock until context release.

Mikhail Ulyanov committed 11 years ago

Commit 886aa711 parent 69ca0331 file · +5 −5Browse files

Unified · Split

drivers/media/platform/rcar_jpu.c+5−5
@@ -1300,17 +1300,17 @@ static int jpu_release(struct file *file) · 1299 unmodified lines
13001300 struct jpu *jpu = video_drvdata(file);
13011301 struct jpu_ctx *ctx = fh_to_ctx(file->private_data);
13021302
1303− mutex_lock(&jpu->mutex);
1304− if (--jpu->ref_count == 0)
1305− clk_disable_unprepare(jpu->clk);
1306− mutex_unlock(&jpu->mutex);
1307−
13081303 v4l2_m2m_ctx_release(ctx->fh.m2m_ctx);
13091304 v4l2_ctrl_handler_free(&ctx->ctrl_handler);
13101305 v4l2_fh_del(&ctx->fh);
13111306 v4l2_fh_exit(&ctx->fh);
13121307 kfree(ctx);
13131308
1309+ mutex_lock(&jpu->mutex);
1310+ if (--jpu->ref_count == 0)
1311+ clk_disable_unprepare(jpu->clk);
1312+ mutex_unlock(&jpu->mutex);
1313+
13141314 return 0;
13151315 }
13161316

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t