diff options
author | timothywang <timothywang@google.com> | 2020-11-03 15:48:32 +0800 |
---|---|---|
committer | Timothy Wang <timothywang@google.com> | 2020-11-03 09:32:02 +0000 |
commit | 1f19f2624fe5e9d822335d28e48b289c0b553861 (patch) | |
tree | 5a25bd2dc689b6d63863db1a843b513f74553eb4 | |
parent | 76e5cc2342d4497536478426ece4e274c518dae3 (diff) | |
download | camera-kernel-1f19f2624fe5e9d822335d28e48b289c0b553861.tar.gz |
camera: cci: Fix incorrect use of cci config ioctl
From 0e69194cd695a4f8da143c787ad37409e445ba43 Mon Sep 17 00:00:00 2001
From: Fernando Pacheco <fpacheco@codeaurora.org>
Date: Wed, 17 Jun 2020 12:37:39 -0700
Subject: [PATCH] msm: camera: cci: Fix incorrect use of cci config ioctl
The cci configuration will be transitioned to a new API that does not
require routing through the v4l layer. This is work-in-progrss so in
the mean time prevent the device from being exposed as configurable
from userspace.
The ioctl will still be exposed to kernel users so fix the arg size
as well. We want size of struct not pointer.
CRs-Fixed: 2702760
Change-Id: I9c7bd8f76980603dbf27e1c5bc9b19f8a3b8a39a
test: GCA, CTS, ITS
Bug: 170138526
Signed-off-by: Fernando Pacheco <fpacheco@codeaurora.org>
Signed-off-by: timothywang <timothywang@google.com>
Change-Id: I39c2fe26ff0cdda16b8f5c3b43da5f22e4e1bf2c
-rw-r--r-- | drivers/cam_sensor_module/cam_cci/cam_cci_dev.c | 3 | ||||
-rw-r--r-- | drivers/cam_sensor_module/cam_cci/cam_cci_dev.h | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/cam_sensor_module/cam_cci/cam_cci_dev.c b/drivers/cam_sensor_module/cam_cci/cam_cci_dev.c index 78da5e9..4f019dd 100644 --- a/drivers/cam_sensor_module/cam_cci/cam_cci_dev.c +++ b/drivers/cam_sensor_module/cam_cci/cam_cci_dev.c @@ -431,8 +431,7 @@ static int cam_cci_platform_probe(struct platform_device *pdev) sizeof(new_cci_dev->device_name)); new_cci_dev->v4l2_dev_str.name = new_cci_dev->device_name; - new_cci_dev->v4l2_dev_str.sd_flags = - (V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS); + new_cci_dev->v4l2_dev_str.sd_flags = V4L2_SUBDEV_FL_HAS_EVENTS; new_cci_dev->v4l2_dev_str.ent_function = CAM_CCI_DEVICE_TYPE; new_cci_dev->v4l2_dev_str.token = diff --git a/drivers/cam_sensor_module/cam_cci/cam_cci_dev.h b/drivers/cam_sensor_module/cam_cci/cam_cci_dev.h index 3b89f93..25c8efe 100644 --- a/drivers/cam_sensor_module/cam_cci/cam_cci_dev.h +++ b/drivers/cam_sensor_module/cam_cci/cam_cci_dev.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. */ #ifndef _CAM_CCI_DEV_H_ @@ -298,7 +298,7 @@ irqreturn_t cam_cci_irq(int irq_num, void *data); struct v4l2_subdev *cam_cci_get_subdev(int cci_dev_index); #define VIDIOC_MSM_CCI_CFG \ - _IOWR('V', BASE_VIDIOC_PRIVATE + 23, struct cam_cci_ctrl *) + _IOWR('V', BASE_VIDIOC_PRIVATE + 23, struct cam_cci_ctrl) #ifdef CONFIG_SPECTRA_CAMERA_MODULE extern int cam_cci_late_init(void); |