@@ -186,45 +186,22 @@ static int wpf_init_controls(struct vsp1_rwpf *wpf)
186186}
187187
188188/* -----------------------------------------------------------------------------
189- * V4L2 Subdevice Core Operations
189+ * VSP1 Entity Operations
190190 */
191191
192- static int wpf_s_stream (struct v4l2_subdev * subdev , int enable )
192+ void vsp1_wpf_stop (struct vsp1_rwpf * wpf )
193193{
194- struct vsp1_rwpf * wpf = to_rwpf (subdev );
195194 struct vsp1_device * vsp1 = wpf -> entity .vsp1 ;
196195
197- if (enable )
198- return 0 ;
199-
200196 /*
201197 * Write to registers directly when stopping the stream as there will be
202198 * no pipeline run to apply the display list.
203199 */
204200 vsp1_write (vsp1 , VI6_WPF_IRQ_ENB (wpf -> entity .index ), 0 );
205201 vsp1_write (vsp1 , wpf -> entity .index * VI6_WPF_OFFSET +
206202 VI6_WPF_SRCRPF , 0 );
207-
208- return 0 ;
209203}
210204
211- /* -----------------------------------------------------------------------------
212- * V4L2 Subdevice Operations
213- */
214-
215- static const struct v4l2_subdev_video_ops wpf_video_ops = {
216- .s_stream = wpf_s_stream ,
217- };
218-
219- static const struct v4l2_subdev_ops wpf_ops = {
220- .video = & wpf_video_ops ,
221- .pad = & vsp1_rwpf_pad_ops ,
222- };
223-
224- /* -----------------------------------------------------------------------------
225- * VSP1 Entity Operations
226- */
227-
228205static void vsp1_wpf_destroy (struct vsp1_entity * entity )
229206{
230207 struct vsp1_rwpf * wpf = entity_to_rwpf (entity );
@@ -583,7 +560,7 @@ struct vsp1_rwpf *vsp1_wpf_create(struct vsp1_device *vsp1, unsigned int index)
583560 wpf -> entity .index = index ;
584561
585562 sprintf (name , "wpf.%u" , index );
586- ret = vsp1_entity_init (vsp1 , & wpf -> entity , name , 2 , & wpf_ops ,
563+ ret = vsp1_entity_init (vsp1 , & wpf -> entity , name , 2 , & vsp1_rwpf_subdev_ops ,
587564 MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER );
588565 if (ret < 0 )
589566 return ERR_PTR (ret );
0 commit comments