media: vim2m: Remove compilation conditional to CONFIG_MEDIA_CONTROLLER
PATCH 1/1 media: vim2m: Remove compilation conditional to CONFIG_MEDIA_CONTROLLER
MEDIA_CONTROLLER is selected for vim2m already since commit 016baa59bf9f ("media: Kconfig: Don't expose the Request API option"). Also remove the related #ifdefs.
Signed-off-by Sakari Ailus <[email protected]>
--- drivers/media/test-drivers/vim2m.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/media/test-drivers/vim2m.c +1 -12
@@ -191,9 +191,7 @@ static void get_alignment(u32 fourcc,struct vim2m_dev {struct v4l2_device v4l2_dev;struct video_device vfd; -#ifdef CONFIG_MEDIA_CONTROLLER struct media_device mdev; -#endif atomic_t num_inst;struct mutex dev_mutex;
@@ -1470,9 +1468,7 @@ static void vim2m_device_release(struct video_device *vdev)v4l2_device_unregister (&dev->v4l2_dev);v4l2_m2m_release (dev->m2m_dev); -#ifdef CONFIG_MEDIA_CONTROLLER media_device_cleanup (&dev->mdev); -#endif kfree (dev); }
@@ -1543,7 +1539,6 @@ static int vim2m_probe(struct platform_device *pdev) goto error_dev; } -#ifdef CONFIG_MEDIA_CONTROLLER dev->mdev.dev = &pdev->dev;strscpy (dev->mdev.model,"vim2m" ,sizeof (dev->mdev.model)); strscpy(dev->mdev.bus_info, "platform:vim2m",
@@ -1551,7 +1546,6 @@ static int vim2m_probe(struct platform_device *pdev)media_device_init (&dev->mdev); dev->mdev.ops = &m2m_media_ops; dev->v4l2_dev.mdev = &dev->mdev; -#endif ret =video_register_device (vfd,VFL_TYPE_VIDEO ,0 );if (ret) {
@@ -1562,7 +1556,6 @@ static int vim2m_probe(struct platform_device *pdev)v4l2_info (&dev->v4l2_dev,"Device registered as /dev/video%d\n" , vfd->num); -#ifdef CONFIG_MEDIA_CONTROLLER ret =v4l2_m2m_register_media_controller (dev->m2m_dev, vfd,MEDIA_ENT_F_PROC_VIDEO_SCALER );if (ret) {
@@ -1575,13 +1568,11 @@ static int vim2m_probe(struct platform_device *pdev)v4l2_err (&dev->v4l2_dev,"Failed to register mem2mem media device\n" ); goto error_m2m_mc; } -#endif +return 0 ; -#ifdef CONFIG_MEDIA_CONTROLLER error_m2m_mc:v4l2_m2m_unregister_media_controller (dev->m2m_dev); -#endif error_v4l2:video_unregister_device (&dev->vfd);/* vim2m_device_release called by video_unregister_device to release various objects */
@@ -1602,10 +1593,8 @@ static void vim2m_remove(struct platform_device *pdev)v4l2_info (&dev->v4l2_dev,"Removing " MEM2MEM_NAME ); -#ifdef CONFIG_MEDIA_CONTROLLER media_device_unregister (&dev->mdev);v4l2_m2m_unregister_media_controller (dev->m2m_dev); -#endif video_unregister_device (&dev->vfd); }
Signature · 1 line
2.39.5