Skip to content

Commit 932d87c

Browse files
bulwahnHans Verkuil
authored andcommitted
media: imx: remove code for non-existing config IMX_GPT_ICAP
There never was a config IMX_GPT_ICAP in the repository. So remove the code conditional on this config and simplify the callers that just called empty functions. Signed-off-by: Lukas Bulwahn <[email protected]> Reviewed-by: Tommaso Merciai <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 7d21e0b commit 932d87c

File tree

1 file changed

+1
-56
lines changed

1 file changed

+1
-56
lines changed

drivers/staging/media/imx/imx-media-fim.c

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -187,54 +187,6 @@ static void frame_interval_monitor(struct imx_media_fim *fim,
187187
send_fim_event(fim, error_avg);
188188
}
189189

190-
#ifdef CONFIG_IMX_GPT_ICAP
191-
/*
192-
* Input Capture method of measuring frame intervals. Not subject
193-
* to interrupt latency.
194-
*/
195-
static void fim_input_capture_handler(int channel, void *dev_id,
196-
ktime_t timestamp)
197-
{
198-
struct imx_media_fim *fim = dev_id;
199-
unsigned long flags;
200-
201-
spin_lock_irqsave(&fim->lock, flags);
202-
203-
frame_interval_monitor(fim, timestamp);
204-
205-
if (!completion_done(&fim->icap_first_event))
206-
complete(&fim->icap_first_event);
207-
208-
spin_unlock_irqrestore(&fim->lock, flags);
209-
}
210-
211-
static int fim_request_input_capture(struct imx_media_fim *fim)
212-
{
213-
init_completion(&fim->icap_first_event);
214-
215-
return mxc_request_input_capture(fim->icap_channel,
216-
fim_input_capture_handler,
217-
fim->icap_flags, fim);
218-
}
219-
220-
static void fim_free_input_capture(struct imx_media_fim *fim)
221-
{
222-
mxc_free_input_capture(fim->icap_channel, fim);
223-
}
224-
225-
#else /* CONFIG_IMX_GPT_ICAP */
226-
227-
static int fim_request_input_capture(struct imx_media_fim *fim)
228-
{
229-
return 0;
230-
}
231-
232-
static void fim_free_input_capture(struct imx_media_fim *fim)
233-
{
234-
}
235-
236-
#endif /* CONFIG_IMX_GPT_ICAP */
237-
238190
/*
239191
* In case we are monitoring the first frame interval after streamon
240192
* (when fim->num_skip = 0), we need a valid fim->last_ts before we
@@ -434,15 +386,8 @@ int imx_media_fim_set_stream(struct imx_media_fim *fim,
434386
update_fim_nominal(fim, fi);
435387
spin_unlock_irqrestore(&fim->lock, flags);
436388

437-
if (icap_enabled(fim)) {
438-
ret = fim_request_input_capture(fim);
439-
if (ret)
440-
goto out;
441-
fim_acquire_first_ts(fim);
442-
}
443-
} else {
444389
if (icap_enabled(fim))
445-
fim_free_input_capture(fim);
390+
fim_acquire_first_ts(fim);
446391
}
447392

448393
fim->stream_on = on;

0 commit comments

Comments
 (0)