Commit 02c39233 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: atomisp: atomisp_subdev.c check ISP version on runtime

Remove ISP-version-dependent ifdefs.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent a19b190e
...@@ -1039,7 +1039,6 @@ static const struct v4l2_ctrl_config ctrl_depth_mode = { ...@@ -1039,7 +1039,6 @@ static const struct v4l2_ctrl_config ctrl_depth_mode = {
.def = 0, .def = 0,
}; };
#ifdef ISP2401
/* /*
* Control for selectting ISP version * Control for selectting ISP version
* *
...@@ -1058,13 +1057,14 @@ static const struct v4l2_ctrl_config ctrl_select_isp_version = { ...@@ -1058,13 +1057,14 @@ static const struct v4l2_ctrl_config ctrl_select_isp_version = {
.def = 0, .def = 0,
}; };
#ifdef CONFIG_ION #if 0 /* #ifdef CONFIG_ION */
/* /*
* Control for ISP ion device fd * Control for ISP ion device fd
* *
* userspace will open ion device and pass the fd to kernel. * userspace will open ion device and pass the fd to kernel.
* this fd will be used to map shared fd to buffer. * this fd will be used to map shared fd to buffer.
*/ */
/* V4L2_CID_ATOMISP_ION_DEVICE_FD is not defined */
static const struct v4l2_ctrl_config ctrl_ion_dev_fd = { static const struct v4l2_ctrl_config ctrl_ion_dev_fd = {
.ops = &ctrl_ops, .ops = &ctrl_ops,
.id = V4L2_CID_ATOMISP_ION_DEVICE_FD, .id = V4L2_CID_ATOMISP_ION_DEVICE_FD,
...@@ -1077,7 +1077,6 @@ static const struct v4l2_ctrl_config ctrl_ion_dev_fd = { ...@@ -1077,7 +1077,6 @@ static const struct v4l2_ctrl_config ctrl_ion_dev_fd = {
}; };
#endif #endif
#endif
static void atomisp_init_subdev_pipe(struct atomisp_sub_device *asd, static void atomisp_init_subdev_pipe(struct atomisp_sub_device *asd,
struct atomisp_video_pipe *pipe, enum v4l2_buf_type buf_type) struct atomisp_video_pipe *pipe, enum v4l2_buf_type buf_type)
{ {
...@@ -1220,19 +1219,16 @@ static int isp_subdev_init_entities(struct atomisp_sub_device *asd) ...@@ -1220,19 +1219,16 @@ static int isp_subdev_init_entities(struct atomisp_sub_device *asd)
v4l2_ctrl_new_custom(&asd->ctrl_handler, v4l2_ctrl_new_custom(&asd->ctrl_handler,
&ctrl_disable_dz, &ctrl_disable_dz,
NULL); NULL);
#ifdef ISP2401 if (atomisp_hw_is_isp2401) {
asd->select_isp_version = asd->select_isp_version = v4l2_ctrl_new_custom(&asd->ctrl_handler,
v4l2_ctrl_new_custom(&asd->ctrl_handler, &ctrl_select_isp_version,
&ctrl_select_isp_version, NULL);
NULL); #if 0 /* #ifdef CONFIG_ION */
asd->ion_dev_fd = v4l2_ctrl_new_custom(&asd->ctrl_handler,
#ifdef CONFIG_ION &ctrl_ion_dev_fd,
asd->ion_dev_fd = NULL);
v4l2_ctrl_new_custom(&asd->ctrl_handler,
&ctrl_ion_dev_fd,
NULL);
#endif
#endif #endif
}
/* Make controls visible on subdev as well. */ /* Make controls visible on subdev as well. */
asd->subdev.ctrl_handler = &asd->ctrl_handler; asd->subdev.ctrl_handler = &asd->ctrl_handler;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment