Commit 02330fb0 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

media: atomisp: remove some dead code



There are several parts of atomisp that are meant to be
built on different environments, tested using ifdefs.

Remove some of them, as this code should build only on
Linux.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent eaa399eb
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -403,7 +403,6 @@ static int lm3554_g_flash_status(struct v4l2_subdev *sd, s32 *val)
	return 0;
}

#ifndef CSS15
static int lm3554_g_flash_status_register(struct v4l2_subdev *sd, s32 *val)
{
	struct lm3554 *flash = to_lm3554(sd);
@@ -417,7 +416,6 @@ static int lm3554_g_flash_status_register(struct v4l2_subdev *sd, s32 *val)
	*val = ret;
	return 0;
}
#endif

static int lm3554_s_ctrl(struct v4l2_ctrl *ctrl)
{
@@ -475,11 +473,9 @@ static int lm3554_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
	case V4L2_CID_FLASH_STATUS:
		ret = lm3554_g_flash_status(&dev->sd, &ctrl->val);
		break;
#ifndef CSS15
	case V4L2_CID_FLASH_STATUS_REGISTER:
		ret = lm3554_g_flash_status_register(&dev->sd, &ctrl->val);
		break;
#endif
	default:
		ret = -EINVAL;
	}
@@ -570,7 +566,6 @@ static const struct v4l2_ctrl_config lm3554_controls[] = {
		.def = ATOMISP_FLASH_STATUS_OK,
		.flags = 0,
	},
#ifndef CSS15
	{
		.ops = &ctrl_ops,
		.id = V4L2_CID_FLASH_STATUS_REGISTER,
@@ -582,7 +577,6 @@ static const struct v4l2_ctrl_config lm3554_controls[] = {
		.def = 0,
		.flags = 0,
	},
#endif
};

/* -----------------------------------------------------------------------------
+0 −10
Original line number Diff line number Diff line
@@ -1112,7 +1112,6 @@ static int mt9m114_g_exposure(struct v4l2_subdev *sd, s32 *value)
	return 0;
}

#ifndef CSS15
/*
 * This function will return the sensor supported max exposure zone number.
 * the sensor which supports max exposure zone number is 1.
@@ -1222,7 +1221,6 @@ static int mt9m114_s_exposure_selection(struct v4l2_subdev *sd,

	return 0;
}
#endif

static int mt9m114_g_bin_factor_x(struct v4l2_subdev *sd, s32 *val)
{
@@ -1331,11 +1329,9 @@ static int mt9m114_s_ctrl(struct v4l2_ctrl *ctrl)
			__func__, ctrl->val);
		ret = mt9m114_t_hflip(&dev->sd, ctrl->val);
		break;
#ifndef CSS15
	case V4L2_CID_EXPOSURE_METERING:
		ret = mt9m114_s_exposure_metering(&dev->sd, ctrl->val);
		break;
#endif
	case V4L2_CID_EXPOSURE:
		ret = mt9m114_s_ev(&dev->sd, ctrl->val);
		break;
@@ -1373,11 +1369,9 @@ static int mt9m114_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
	case V4L2_CID_EXPOSURE_ABSOLUTE:
		ret = mt9m114_g_exposure(&dev->sd, &ctrl->val);
		break;
#ifndef CSS15
	case V4L2_CID_EXPOSURE_ZONE_NUM:
		ret = mt9m114_g_exposure_zone_num(&dev->sd, &ctrl->val);
		break;
#endif
	case V4L2_CID_BIN_FACTOR_HORZ:
		ret = mt9m114_g_bin_factor_x(&dev->sd, &ctrl->val);
		break;
@@ -1467,7 +1461,6 @@ static struct v4l2_ctrl_config mt9m114_controls[] = {
		.def = 0,
		.flags = 0,
	},
#ifndef CSS15
	{
		.ops = &ctrl_ops,
		.id = V4L2_CID_EXPOSURE_ZONE_NUM,
@@ -1490,7 +1483,6 @@ static struct v4l2_ctrl_config mt9m114_controls[] = {
		.def = 1,
		.flags = 0,
	},
#endif
	{
		.ops = &ctrl_ops,
		.id = V4L2_CID_BIN_FACTOR_HORZ,
@@ -1794,9 +1786,7 @@ static const struct v4l2_subdev_pad_ops mt9m114_pad_ops = {
	.enum_frame_size = mt9m114_enum_frame_size,
	.get_fmt = mt9m114_get_fmt,
	.set_fmt = mt9m114_set_fmt,
#ifndef CSS15
	.set_selection = mt9m114_s_exposure_selection,
#endif
};

static const struct v4l2_subdev_ops mt9m114_ops = {
+0 −4
Original line number Diff line number Diff line
@@ -14,9 +14,6 @@
 *
 *
 */
#ifdef CSS15
#include <linux/atomisp_css15.h>
#else

#ifndef _ATOM_ISP_H
#define _ATOM_ISP_H
@@ -1357,4 +1354,3 @@ enum {
};

#endif /* _ATOM_ISP_H */
#endif /* CSS15*/
+0 −4
Original line number Diff line number Diff line
@@ -25,11 +25,7 @@

#include "system_global.h"

#ifdef __FIST__
#define HRT_ADDRESS_WIDTH	32		/* Surprise, this is a local property and even differs per platform */
#else
#define HRT_ADDRESS_WIDTH	64		/* Surprise, this is a local property */
#endif

/* This interface is deprecated */
#include "hrt/hive_types.h"
+0 −4
Original line number Diff line number Diff line
@@ -177,11 +177,7 @@

#define _isp_ceil_div(a, b)                     (((a) + (b) - 1) / (b))

#ifdef C_RUN
#define ISP_VEC_ALIGN                          (_isp_ceil_div(ISP_VEC_WIDTH, 64) * 8)
#else
#define ISP_VEC_ALIGN                          ISP_VMEM_ALIGN
#endif

/* HRT specific vector support */
#define isp2401_mamoiada_vector_alignment         ISP_VEC_ALIGN
Loading