media: coda: remove unused instances list
authorPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 5 Nov 2018 15:25:04 +0000 (10:25 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 23 Nov 2018 10:27:59 +0000 (05:27 -0500)
The per-device instance list is unused, remove it.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/coda/coda-common.c
drivers/media/platform/coda/coda.h

index 053c486d7bdc70b30ead9b53eb76c0f606366e92..d9466c2aea19badfb0da12618781356cf56a09b1 100644 (file)
@@ -2215,10 +2215,6 @@ static int coda_open(struct file *file)
        INIT_LIST_HEAD(&ctx->buffer_meta_list);
        spin_lock_init(&ctx->buffer_meta_lock);
 
-       mutex_lock(&dev->dev_mutex);
-       list_add(&ctx->list, &dev->instances);
-       mutex_unlock(&dev->dev_mutex);
-
        v4l2_dbg(1, coda_debug, &dev->v4l2_dev, "Created instance %d (%p)\n",
                 ctx->idx, ctx);
 
@@ -2265,10 +2261,6 @@ static int coda_release(struct file *file)
                flush_work(&ctx->seq_end_work);
        }
 
-       mutex_lock(&dev->dev_mutex);
-       list_del(&ctx->list);
-       mutex_unlock(&dev->dev_mutex);
-
        if (ctx->dev->devtype->product == CODA_DX6)
                coda_free_aux_buf(dev, &ctx->workbuf);
 
@@ -2673,7 +2665,6 @@ static int coda_probe(struct platform_device *pdev)
                return -EINVAL;
 
        spin_lock_init(&dev->irqlock);
-       INIT_LIST_HEAD(&dev->instances);
 
        dev->plat_dev = pdev;
        dev->clk_per = devm_clk_get(&pdev->dev, "per");
index e35f505053d09621e27289f496ed2e360c9c04b3..7fd0157c759a77b691356e4cf667c8e5c114b8fe 100644 (file)
@@ -95,7 +95,6 @@ struct coda_dev {
        struct mutex            coda_mutex;
        struct workqueue_struct *workqueue;
        struct v4l2_m2m_dev     *m2m_dev;
-       struct list_head        instances;
        struct ida              ida;
        struct dentry           *debugfs_root;
 };
@@ -193,7 +192,6 @@ struct coda_context_ops {
 struct coda_ctx {
        struct coda_dev                 *dev;
        struct mutex                    buffer_mutex;
-       struct list_head                list;
        struct work_struct              pic_run_work;
        struct work_struct              seq_end_work;
        struct completion               completion;