Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7e913cc authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Mauro Carvalho Chehab
Browse files

media: mem2mem: Remove unused v4l2_m2m_ops .lock/.unlock



Commit f1a81afc ("[media] m2m: fix bad unlock balance")
removed the last use of v4l2_m2m_ops.lock and
v4l2_m2m_ops.unlock hooks. They are not actually
used anymore. Remove them.

Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 1b97e527
Loading
Loading
Loading
Loading
+4 −22
Original line number Diff line number Diff line
@@ -1297,28 +1297,10 @@ static void coda_job_abort(void *priv)
		 "Aborting task\n");
}

static void coda_lock(void *m2m_priv)
{
	struct coda_ctx *ctx = m2m_priv;
	struct coda_dev *pcdev = ctx->dev;

	mutex_lock(&pcdev->dev_mutex);
}

static void coda_unlock(void *m2m_priv)
{
	struct coda_ctx *ctx = m2m_priv;
	struct coda_dev *pcdev = ctx->dev;

	mutex_unlock(&pcdev->dev_mutex);
}

static const struct v4l2_m2m_ops coda_m2m_ops = {
	.device_run	= coda_device_run,
	.job_ready	= coda_job_ready,
	.job_abort	= coda_job_abort,
	.lock		= coda_lock,
	.unlock		= coda_unlock,
};

static void set_default_params(struct coda_ctx *ctx)
@@ -2092,9 +2074,9 @@ static int coda_open(struct file *file)
	INIT_LIST_HEAD(&ctx->buffer_meta_list);
	spin_lock_init(&ctx->buffer_meta_lock);

	coda_lock(ctx);
	mutex_lock(&dev->dev_mutex);
	list_add(&ctx->list, &dev->instances);
	coda_unlock(ctx);
	mutex_unlock(&dev->dev_mutex);

	v4l2_dbg(1, coda_debug, &dev->v4l2_dev, "Created instance %d (%p)\n",
		 ctx->idx, ctx);
@@ -2142,9 +2124,9 @@ static int coda_release(struct file *file)
		flush_work(&ctx->seq_end_work);
	}

	coda_lock(ctx);
	mutex_lock(&dev->dev_mutex);
	list_del(&ctx->list);
	coda_unlock(ctx);
	mutex_unlock(&dev->dev_mutex);

	if (ctx->dev->devtype->product == CODA_DX6)
		coda_free_aux_buf(dev, &ctx->workbuf);
+2 −18
Original line number Diff line number Diff line
@@ -181,20 +181,6 @@ static void deinterlace_job_abort(void *priv)
	v4l2_m2m_job_finish(pcdev->m2m_dev, ctx->m2m_ctx);
}

static void deinterlace_lock(void *priv)
{
	struct deinterlace_ctx *ctx = priv;
	struct deinterlace_dev *pcdev = ctx->dev;
	mutex_lock(&pcdev->dev_mutex);
}

static void deinterlace_unlock(void *priv)
{
	struct deinterlace_ctx *ctx = priv;
	struct deinterlace_dev *pcdev = ctx->dev;
	mutex_unlock(&pcdev->dev_mutex);
}

static void dma_callback(void *data)
{
	struct deinterlace_ctx *curr_ctx = data;
@@ -956,9 +942,9 @@ static __poll_t deinterlace_poll(struct file *file,
	struct deinterlace_ctx *ctx = file->private_data;
	__poll_t ret;

	deinterlace_lock(ctx);
	mutex_lock(&ctx->dev->dev_mutex);
	ret = v4l2_m2m_poll(file, ctx->m2m_ctx, wait);
	deinterlace_unlock(ctx);
	mutex_unlock(&ctx->dev->dev_mutex);

	return ret;
}
@@ -992,8 +978,6 @@ static const struct v4l2_m2m_ops m2m_ops = {
	.device_run	= deinterlace_device_run,
	.job_ready	= deinterlace_job_ready,
	.job_abort	= deinterlace_job_abort,
	.lock		= deinterlace_lock,
	.unlock		= deinterlace_unlock,
};

static int deinterlace_probe(struct platform_device *pdev)
+0 −18
Original line number Diff line number Diff line
@@ -1411,28 +1411,10 @@ int mtk_vcodec_dec_ctrls_setup(struct mtk_vcodec_ctx *ctx)
	return 0;
}

static void m2mops_vdec_lock(void *m2m_priv)
{
	struct mtk_vcodec_ctx *ctx = m2m_priv;

	mtk_v4l2_debug(3, "[%d]", ctx->id);
	mutex_lock(&ctx->dev->dev_mutex);
}

static void m2mops_vdec_unlock(void *m2m_priv)
{
	struct mtk_vcodec_ctx *ctx = m2m_priv;

	mtk_v4l2_debug(3, "[%d]", ctx->id);
	mutex_unlock(&ctx->dev->dev_mutex);
}

const struct v4l2_m2m_ops mtk_vdec_m2m_ops = {
	.device_run	= m2mops_vdec_device_run,
	.job_ready	= m2mops_vdec_job_ready,
	.job_abort	= m2mops_vdec_job_abort,
	.lock		= m2mops_vdec_lock,
	.unlock		= m2mops_vdec_unlock,
};

static const struct vb2_ops mtk_vdec_vb2_ops = {
+0 −16
Original line number Diff line number Diff line
@@ -1181,26 +1181,10 @@ static void m2mops_venc_job_abort(void *priv)
	ctx->state = MTK_STATE_ABORT;
}

static void m2mops_venc_lock(void *m2m_priv)
{
	struct mtk_vcodec_ctx *ctx = m2m_priv;

	mutex_lock(&ctx->dev->dev_mutex);
}

static void m2mops_venc_unlock(void *m2m_priv)
{
	struct mtk_vcodec_ctx *ctx = m2m_priv;

	mutex_unlock(&ctx->dev->dev_mutex);
}

const struct v4l2_m2m_ops mtk_venc_m2m_ops = {
	.device_run	= m2mops_venc_device_run,
	.job_ready	= m2mops_venc_job_ready,
	.job_abort	= m2mops_venc_job_abort,
	.lock		= m2mops_venc_lock,
	.unlock		= m2mops_venc_unlock,
};

void mtk_vcodec_enc_set_default_params(struct mtk_vcodec_ctx *ctx)
+0 −16
Original line number Diff line number Diff line
@@ -250,20 +250,6 @@ static void emmaprp_job_abort(void *priv)
	v4l2_m2m_job_finish(pcdev->m2m_dev, ctx->m2m_ctx);
}

static void emmaprp_lock(void *priv)
{
	struct emmaprp_ctx *ctx = priv;
	struct emmaprp_dev *pcdev = ctx->dev;
	mutex_lock(&pcdev->dev_mutex);
}

static void emmaprp_unlock(void *priv)
{
	struct emmaprp_ctx *ctx = priv;
	struct emmaprp_dev *pcdev = ctx->dev;
	mutex_unlock(&pcdev->dev_mutex);
}

static inline void emmaprp_dump_regs(struct emmaprp_dev *pcdev)
{
	dprintk(pcdev,
@@ -885,8 +871,6 @@ static const struct video_device emmaprp_videodev = {
static const struct v4l2_m2m_ops m2m_ops = {
	.device_run	= emmaprp_device_run,
	.job_abort	= emmaprp_job_abort,
	.lock		= emmaprp_lock,
	.unlock		= emmaprp_unlock,
};

static int emmaprp_probe(struct platform_device *pdev)
Loading