Skip to content

Commit 915775d

Browse files
Laurent Pinchartgregkh
authored andcommitted
media: amphion: Make some vpu_v4l2 functions static
[ Upstream commit 5d1e54b ] Some functions defined in vpu_v4l2.c are never used outside of that compilation unit. Make them static. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Ming Qian <ming.qian@oss.nxp.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Stable-dep-of: 634c2cd ("media: amphion: Remove vpu_vb_is_codecconfig") Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ce6f2d6 commit 915775d

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

drivers/media/platform/amphion/vpu_v4l2.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
#include "vpu_msgs.h"
2525
#include "vpu_helpers.h"
2626

27+
static char *vpu_type_name(u32 type)
28+
{
29+
return V4L2_TYPE_IS_OUTPUT(type) ? "output" : "capture";
30+
}
31+
2732
void vpu_inst_lock(struct vpu_inst *inst)
2833
{
2934
mutex_lock(&inst->lock);
@@ -42,7 +47,7 @@ dma_addr_t vpu_get_vb_phy_addr(struct vb2_buffer *vb, u32 plane_no)
4247
vb->planes[plane_no].data_offset;
4348
}
4449

45-
unsigned int vpu_get_vb_length(struct vb2_buffer *vb, u32 plane_no)
50+
static unsigned int vpu_get_vb_length(struct vb2_buffer *vb, u32 plane_no)
4651
{
4752
if (plane_no >= vb->num_planes)
4853
return 0;
@@ -81,7 +86,7 @@ void vpu_v4l2_set_error(struct vpu_inst *inst)
8186
vpu_inst_unlock(inst);
8287
}
8388

84-
int vpu_notify_eos(struct vpu_inst *inst)
89+
static int vpu_notify_eos(struct vpu_inst *inst)
8590
{
8691
static const struct v4l2_event ev = {
8792
.id = 0,
@@ -562,7 +567,8 @@ static void vpu_vb2_buf_finish(struct vb2_buffer *vb)
562567
call_void_vop(inst, on_queue_empty, q->type);
563568
}
564569

565-
void vpu_vb2_buffers_return(struct vpu_inst *inst, unsigned int type, enum vb2_buffer_state state)
570+
static void vpu_vb2_buffers_return(struct vpu_inst *inst, unsigned int type,
571+
enum vb2_buffer_state state)
566572
{
567573
struct vb2_v4l2_buffer *buf;
568574

drivers/media/platform/amphion/vpu_v4l2.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,12 @@ void vpu_skip_frame(struct vpu_inst *inst, int count);
2626
struct vb2_v4l2_buffer *vpu_find_buf_by_sequence(struct vpu_inst *inst, u32 type, u32 sequence);
2727
struct vb2_v4l2_buffer *vpu_find_buf_by_idx(struct vpu_inst *inst, u32 type, u32 idx);
2828
void vpu_v4l2_set_error(struct vpu_inst *inst);
29-
int vpu_notify_eos(struct vpu_inst *inst);
3029
int vpu_notify_source_change(struct vpu_inst *inst);
3130
int vpu_set_last_buffer_dequeued(struct vpu_inst *inst, bool eos);
32-
void vpu_vb2_buffers_return(struct vpu_inst *inst, unsigned int type, enum vb2_buffer_state state);
3331
int vpu_get_num_buffers(struct vpu_inst *inst, u32 type);
3432
bool vpu_is_source_empty(struct vpu_inst *inst);
3533

3634
dma_addr_t vpu_get_vb_phy_addr(struct vb2_buffer *vb, u32 plane_no);
37-
unsigned int vpu_get_vb_length(struct vb2_buffer *vb, u32 plane_no);
3835
static inline struct vpu_format *vpu_get_format(struct vpu_inst *inst, u32 type)
3936
{
4037
if (V4L2_TYPE_IS_OUTPUT(type))
@@ -43,11 +40,6 @@ static inline struct vpu_format *vpu_get_format(struct vpu_inst *inst, u32 type)
4340
return &inst->cap_format;
4441
}
4542

46-
static inline char *vpu_type_name(u32 type)
47-
{
48-
return V4L2_TYPE_IS_OUTPUT(type) ? "output" : "capture";
49-
}
50-
5143
static inline int vpu_vb_is_codecconfig(struct vb2_v4l2_buffer *vbuf)
5244
{
5345
#ifdef V4L2_BUF_FLAG_CODECCONFIG

0 commit comments

Comments
 (0)