Browse Source

msm: camera: req_mgr: Update V4L2 enum names for Waipio

V4L2 driver macro VFL_TYPE_GRABBER has been renamed to VFL_TYPE_VIDEO
in linux kernel 5.8+.

CRs-Fixed: 2835738
Change-Id: Iaddec45b3532094a110e386c6462f08c36a5fd21
Signed-off-by: Karthik Jayakumar <[email protected]>
Signed-off-by: Jeyaprakash Soundrapandian <[email protected]>
Signed-off-by: Karthik Jayakumar <[email protected]>
Karthik Jayakumar 4 years ago
parent
commit
8615106476

+ 2 - 2
drivers/cam_req_mgr/cam_req_mgr_dev.c

@@ -585,9 +585,9 @@ static int cam_video_device_setup(void)
 	g_dev.video->fops = &g_cam_fops;
 	g_dev.video->ioctl_ops = &g_cam_ioctl_ops;
 	g_dev.video->minor = -1;
-	g_dev.video->vfl_type = VFL_TYPE_GRABBER;
+	g_dev.video->vfl_type = VFL_TYPE_VIDEO;
 	g_dev.video->device_caps |= V4L2_CAP_VIDEO_CAPTURE;
-	rc = video_register_device(g_dev.video, VFL_TYPE_GRABBER, -1);
+	rc = video_register_device(g_dev.video, VFL_TYPE_VIDEO, -1);
 	if (rc) {
 		CAM_ERR(CAM_CRM,
 			"video device registration failure rc = %d, name = %s, device_caps = %d",

+ 3 - 4
drivers/cam_sync/cam_sync.c

@@ -12,10 +12,10 @@
 #if IS_REACHABLE(CONFIG_MSM_GLOBAL_SYNX)
 #include <synx_api.h>
 #endif
-
 #include "cam_sync_util.h"
 #include "cam_debug_util.h"
 #include "cam_common_util.h"
+#include "cam_compat.h"
 #include "camera_main.h"
 #include "cam_req_mgr_workq.h"
 
@@ -1186,9 +1186,8 @@ static int cam_sync_component_bind(struct device *dev,
 	sync_dev->vdev->ioctl_ops = &g_cam_sync_ioctl_ops;
 	sync_dev->vdev->minor     = -1;
 	sync_dev->vdev->device_caps |= V4L2_CAP_VIDEO_CAPTURE;
-	sync_dev->vdev->vfl_type  = VFL_TYPE_GRABBER;
-	rc = video_register_device(sync_dev->vdev,
-		VFL_TYPE_GRABBER, -1);
+	sync_dev->vdev->vfl_type  = VFL_TYPE_VIDEO;
+	rc = video_register_device(sync_dev->vdev, VFL_TYPE_VIDEO, -1);
 	if (rc < 0) {
 		CAM_ERR(CAM_SYNC,
 			"video device registration failure rc = %d, name = %s, device_caps = %d",

+ 1 - 1
drivers/cam_utils/cam_compat.h

@@ -19,7 +19,7 @@
 
 #endif
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)
+#if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE
 
 #include <linux/msm_ion.h>
 #include <linux/ion.h>