Commit f690abdc authored by Dafna Hirschfeld's avatar Dafna Hirschfeld Committed by Mauro Carvalho Chehab

media: staging: rkisp1: don't define vaddr field in rkisp1_buffer as an array

The field vaddr in rkisp1_buffer struct is used only by the
rkisp1-stats and rkisp1-params entities and they both use only
vaddr[0] so there is no need to define this field as an array.
Signed-off-by: default avatarDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: default avatarHelen Koike <helen.koike@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent a096ddb4
...@@ -127,7 +127,7 @@ struct rkisp1_buffer { ...@@ -127,7 +127,7 @@ struct rkisp1_buffer {
struct list_head queue; struct list_head queue;
union { union {
u32 buff_addr[VIDEO_MAX_PLANES]; u32 buff_addr[VIDEO_MAX_PLANES];
void *vaddr[VIDEO_MAX_PLANES]; void *vaddr;
}; };
}; };
......
...@@ -1209,7 +1209,7 @@ void rkisp1_params_isr(struct rkisp1_device *rkisp1, u32 isp_mis) ...@@ -1209,7 +1209,7 @@ void rkisp1_params_isr(struct rkisp1_device *rkisp1, u32 isp_mis)
if (!cur_buf) if (!cur_buf)
return; return;
new_params = (struct rkisp1_params_cfg *)(cur_buf->vaddr[0]); new_params = (struct rkisp1_params_cfg *)(cur_buf->vaddr);
if (isp_mis & RKISP1_CIF_ISP_FRAME) { if (isp_mis & RKISP1_CIF_ISP_FRAME) {
u32 isp_ctrl; u32 isp_ctrl;
...@@ -1457,7 +1457,7 @@ static void rkisp1_params_vb2_buf_queue(struct vb2_buffer *vb) ...@@ -1457,7 +1457,7 @@ static void rkisp1_params_vb2_buf_queue(struct vb2_buffer *vb)
return; return;
} }
params_buf->vaddr[0] = vb2_plane_vaddr(vb, 0); params_buf->vaddr = vb2_plane_vaddr(vb, 0);
spin_lock_irqsave(&params->config_lock, flags); spin_lock_irqsave(&params->config_lock, flags);
list_add_tail(&params_buf->queue, &params->params); list_add_tail(&params_buf->queue, &params->params);
spin_unlock_irqrestore(&params->config_lock, flags); spin_unlock_irqrestore(&params->config_lock, flags);
......
...@@ -116,7 +116,7 @@ static void rkisp1_stats_vb2_buf_queue(struct vb2_buffer *vb) ...@@ -116,7 +116,7 @@ static void rkisp1_stats_vb2_buf_queue(struct vb2_buffer *vb)
struct vb2_queue *vq = vb->vb2_queue; struct vb2_queue *vq = vb->vb2_queue;
struct rkisp1_stats *stats_dev = vq->drv_priv; struct rkisp1_stats *stats_dev = vq->drv_priv;
stats_buf->vaddr[0] = vb2_plane_vaddr(vb, 0); stats_buf->vaddr = vb2_plane_vaddr(vb, 0);
spin_lock_irq(&stats_dev->lock); spin_lock_irq(&stats_dev->lock);
list_add_tail(&stats_buf->queue, &stats_dev->stat); list_add_tail(&stats_buf->queue, &stats_dev->stat);
...@@ -322,7 +322,7 @@ rkisp1_stats_send_measurement(struct rkisp1_stats *stats, u32 isp_ris) ...@@ -322,7 +322,7 @@ rkisp1_stats_send_measurement(struct rkisp1_stats *stats, u32 isp_ris)
return; return;
cur_stat_buf = cur_stat_buf =
(struct rkisp1_stat_buffer *)(cur_buf->vaddr[0]); (struct rkisp1_stat_buffer *)(cur_buf->vaddr);
if (isp_ris & RKISP1_CIF_ISP_AWB_DONE) if (isp_ris & RKISP1_CIF_ISP_AWB_DONE)
rkisp1_stats_get_awb_meas(stats, cur_stat_buf); rkisp1_stats_get_awb_meas(stats, cur_stat_buf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment