mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 18:46:25 -04:00
media: staging: rkisp1: initialize buffer lists only on probe
The buffer lists of stats and params entities are initialized in queue_setup callback with 'INIT_LIST_HEAD'. It is enough to initialize the lists only upon registration. For the stats entity the list is already initialize upon registration. Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Acked-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
dd48134061
commit
60fcc5beb8
@@ -1420,8 +1420,6 @@ static int rkisp1_params_vb2_queue_setup(struct vb2_queue *vq,
|
||||
unsigned int sizes[],
|
||||
struct device *alloc_devs[])
|
||||
{
|
||||
struct rkisp1_params *params = vq->drv_priv;
|
||||
|
||||
*num_buffers = clamp_t(u32, *num_buffers,
|
||||
RKISP1_ISP_PARAMS_REQ_BUFS_MIN,
|
||||
RKISP1_ISP_PARAMS_REQ_BUFS_MAX);
|
||||
@@ -1430,7 +1428,6 @@ static int rkisp1_params_vb2_queue_setup(struct vb2_queue *vq,
|
||||
|
||||
sizes[0] = sizeof(struct rkisp1_params_cfg);
|
||||
|
||||
INIT_LIST_HEAD(¶ms->params);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1545,6 +1542,7 @@ int rkisp1_params_register(struct rkisp1_device *rkisp1)
|
||||
|
||||
params->rkisp1 = rkisp1;
|
||||
mutex_init(&node->vlock);
|
||||
INIT_LIST_HEAD(¶ms->params);
|
||||
spin_lock_init(¶ms->config_lock);
|
||||
|
||||
strscpy(vdev->name, RKISP1_PARAMS_DEV_NAME, sizeof(vdev->name));
|
||||
|
||||
@@ -94,8 +94,6 @@ static int rkisp1_stats_vb2_queue_setup(struct vb2_queue *vq,
|
||||
unsigned int sizes[],
|
||||
struct device *alloc_devs[])
|
||||
{
|
||||
struct rkisp1_stats *stats = vq->drv_priv;
|
||||
|
||||
*num_planes = 1;
|
||||
|
||||
*num_buffers = clamp_t(u32, *num_buffers, RKISP1_ISP_STATS_REQ_BUFS_MIN,
|
||||
@@ -103,8 +101,6 @@ static int rkisp1_stats_vb2_queue_setup(struct vb2_queue *vq,
|
||||
|
||||
sizes[0] = sizeof(struct rkisp1_stat_buffer);
|
||||
|
||||
INIT_LIST_HEAD(&stats->stat);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user