aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/platform/vimc/vimc-common.h
diff options
context:
space:
mode:
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>2020-01-22 17:01:47 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-03-05 22:42:35 +0100
commit4babf057c143f3801fd689ba90141f4999b7a916 (patch)
treec306c6eb351204f6fc33097d2ad3156824885513 /drivers/media/platform/vimc/vimc-common.h
parent2362f53dde2c0bec7a4396a8e1c77b28b0fff1f8 (diff)
media: vimc: allocate vimc_device dynamically
In future patch, the release of the device will move to the release callback of v4l2_device. Therefore the device will be released only when the last fh will be closed. Dynamic allocation will then be needed since when the device is unbounded and then bounded again, it might be that the probe callback will run before the release of the last device is finished. In that case both operations will run on the same memory concurrently and cause memory corruption. This patch also removes the pdev field of vimc_device since it is not needed anymore. Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/vimc/vimc-common.h')
-rw-r--r--drivers/media/platform/vimc/vimc-common.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/media/platform/vimc/vimc-common.h b/drivers/media/platform/vimc/vimc-common.h
index 87eb8259c2a8..1b6ef7196f3c 100644
--- a/drivers/media/platform/vimc/vimc-common.h
+++ b/drivers/media/platform/vimc/vimc-common.h
@@ -106,14 +106,12 @@ struct vimc_ent_device {
/**
* struct vimc_device - main device for vimc driver
*
- * @pdev pointer to the platform device
* @pipe_cfg pointer to the vimc pipeline configuration structure
* @ent_devs array of vimc_ent_device pointers
* @mdev the associated media_device parent
* @v4l2_dev Internal v4l2 parent device
*/
struct vimc_device {
- struct platform_device pdev;
const struct vimc_pipeline_config *pipe_cfg;
struct vimc_ent_device **ent_devs;
struct media_device mdev;