Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33bf1786 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] vpif_capture: remove unnecessary can_route flag



Calling a subdev op that isn't implemented will just return -ENOIOCTLCMD
No need to have a flag for that.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarSekhar Nori <nsekhar@ti.com>
Acked-by: default avatarLad, Prabhakar <prabhakar.lad@ti.com>
Tested-by: default avatarLad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 311673ee
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -1209,7 +1209,6 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = {
		},
		},
		.input = INPUT_CVBS_VI2B,
		.input = INPUT_CVBS_VI2B,
		.output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
		.output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
		.can_route = 1,
		.vpif_if = {
		.vpif_if = {
			.if_type = VPIF_IF_BT656,
			.if_type = VPIF_IF_BT656,
			.hd_pol  = 1,
			.hd_pol  = 1,
@@ -1225,7 +1224,6 @@ static struct vpif_subdev_info da850_vpif_capture_sdev_info[] = {
		},
		},
		.input = INPUT_SVIDEO_VI2C_VI1C,
		.input = INPUT_SVIDEO_VI2C_VI1C,
		.output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
		.output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
		.can_route = 1,
		.vpif_if = {
		.vpif_if = {
			.if_type = VPIF_IF_BT656,
			.if_type = VPIF_IF_BT656,
			.hd_pol  = 1,
			.hd_pol  = 1,
+0 −2
Original line number Original line Diff line number Diff line
@@ -603,7 +603,6 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = {
		},
		},
		.input = INPUT_CVBS_VI2B,
		.input = INPUT_CVBS_VI2B,
		.output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
		.output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
		.can_route = 1,
		.vpif_if = {
		.vpif_if = {
			.if_type = VPIF_IF_BT656,
			.if_type = VPIF_IF_BT656,
			.hd_pol = 1,
			.hd_pol = 1,
@@ -619,7 +618,6 @@ static struct vpif_subdev_info vpif_capture_sdev_info[] = {
		},
		},
		.input = INPUT_SVIDEO_VI2C_VI1C,
		.input = INPUT_SVIDEO_VI2C_VI1C,
		.output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
		.output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
		.can_route = 1,
		.vpif_if = {
		.vpif_if = {
			.if_type = VPIF_IF_BT656,
			.if_type = VPIF_IF_BT656,
			.hd_pol = 1,
			.hd_pol = 1,
+8 −10
Original line number Original line Diff line number Diff line
@@ -1502,16 +1502,14 @@ static int vpif_s_input(struct file *file, void *priv, unsigned int index)
		}
		}
	}
	}


	if (subdev_info->can_route) {
	input = subdev_info->input;
	input = subdev_info->input;
	output = subdev_info->output;
	output = subdev_info->output;
	ret = v4l2_subdev_call(vpif_obj.sd[sd_index], video, s_routing,
	ret = v4l2_subdev_call(vpif_obj.sd[sd_index], video, s_routing,
			input, output, 0);
			input, output, 0);
		if (ret < 0) {
	if (ret < 0 && ret != -ENOIOCTLCMD) {
		vpif_dbg(1, debug, "Failed to set input\n");
		vpif_dbg(1, debug, "Failed to set input\n");
		return ret;
		return ret;
	}
	}
	}
	ch->input_idx = index;
	ch->input_idx = index;
	ch->curr_subdev_info = subdev_info;
	ch->curr_subdev_info = subdev_info;
	ch->curr_sd_index = sd_index;
	ch->curr_sd_index = sd_index;
@@ -1520,7 +1518,7 @@ static int vpif_s_input(struct file *file, void *priv, unsigned int index)


	/* update tvnorms from the sub device input info */
	/* update tvnorms from the sub device input info */
	ch->video_dev->tvnorms = chan_cfg->inputs[index].input.std;
	ch->video_dev->tvnorms = chan_cfg->inputs[index].input.std;
	return ret;
	return 0;
}
}


/**
/**
+0 −1
Original line number Original line Diff line number Diff line
@@ -39,7 +39,6 @@ struct vpif_subdev_info {
	struct i2c_board_info board_info;
	struct i2c_board_info board_info;
	u32 input;
	u32 input;
	u32 output;
	u32 output;
	unsigned can_route:1;
	struct vpif_interface vpif_if;
	struct vpif_interface vpif_if;
};
};