From: Tomi Valkeinen Date: Tue, 12 Apr 2022 09:42:41 +0000 (+0100) Subject: media: v4l2-subdev: drop extra #ifdef X-Git-Tag: v6.6.17~7479^2~250 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e550c3709237b8fa5740dfba3f513e1d5bd9c6c8;p=platform%2Fkernel%2Flinux-rpi.git media: v4l2-subdev: drop extra #ifdef subdev_open() is inside #ifdef CONFIG_VIDEO_V4L2_SUBDEV_API, which depends on CONFIG_MEDIA_CONTROLLER, so there's no need for an extra Signed-off-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index 30eb504..2f24ef75 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -63,7 +63,7 @@ static int subdev_open(struct file *file) v4l2_fh_init(&subdev_fh->vfh, vdev); v4l2_fh_add(&subdev_fh->vfh); file->private_data = &subdev_fh->vfh; -#if defined(CONFIG_MEDIA_CONTROLLER) + if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) { struct module *owner; @@ -74,7 +74,6 @@ static int subdev_open(struct file *file) } subdev_fh->owner = owner; } -#endif if (sd->internal_ops && sd->internal_ops->open) { ret = sd->internal_ops->open(sd, subdev_fh);