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

Commit f4ad8d74 authored by Lad, Prabhakar's avatar Lad, Prabhakar Committed by Mauro Carvalho Chehab
Browse files

[media] media: davinci: vpif: add check for NULL handler



for da850/omap-l138, there is no need to setup_input_channel_mode()
and set_clock(), to avoid adding dummy code in board file just returning
zero add a check in the driver itself to call the handler only if its
not NULL.

Signed-off-by: default avatarLad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: default avatarManjunath Hadli <manjunath.hadli@ti.com>
Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 99b32b24
Loading
Loading
Loading
Loading
+7 −6
Original line number Original line Diff line number Diff line
@@ -311,13 +311,14 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)
	}
	}


	/* configure 1 or 2 channel mode */
	/* configure 1 or 2 channel mode */
	ret = vpif_config_data->setup_input_channel_mode
	if (vpif_config_data->setup_input_channel_mode) {
					(vpif->std_info.ycmux_mode);
		ret = vpif_config_data->

			setup_input_channel_mode(vpif->std_info.ycmux_mode);
		if (ret < 0) {
		if (ret < 0) {
			vpif_dbg(1, debug, "can't set vpif channel mode\n");
			vpif_dbg(1, debug, "can't set vpif channel mode\n");
			return ret;
			return ret;
		}
		}
	}


	/* Call vpif_set_params function to set the parameters and addresses */
	/* Call vpif_set_params function to set the parameters and addresses */
	ret = vpif_set_video_params(vpif, ch->channel_id);
	ret = vpif_set_video_params(vpif, ch->channel_id);
+7 −6
Original line number Original line Diff line number Diff line
@@ -280,13 +280,14 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)
	}
	}


	/* clock settings */
	/* clock settings */
	ret =
	if (vpif_config_data->set_clock) {
	    vpif_config_data->set_clock(ch->vpifparams.std_info.ycmux_mode,
		ret = vpif_config_data->set_clock(ch->vpifparams.std_info.
					ch->vpifparams.std_info.hd_sd);
		ycmux_mode, ch->vpifparams.std_info.hd_sd);
		if (ret < 0) {
		if (ret < 0) {
			vpif_err("can't set clock\n");
			vpif_err("can't set clock\n");
			return ret;
			return ret;
		}
		}
	}


	/* set the parameters and addresses */
	/* set the parameters and addresses */
	ret = vpif_set_video_params(vpif, ch->channel_id + 2);
	ret = vpif_set_video_params(vpif, ch->channel_id + 2);