On 31 May 2013 18:33, Arun Kumar K <arun...@samsung.com> wrote:
> FIMC-IS has two hardware scalers named as scaler-codec and
> scaler-preview. This patch adds the common code handling the
> video nodes and subdevs of both the scalers.
>
> Signed-off-by: Arun Kumar K <arun...@samsung.com>
> Signed-off-by: Kilyeon Im <kilyeon...@samsung.com>
> ---

[snip]

> +static int scaler_video_capture_open(struct file *file)
> +{
> +       struct fimc_is_scaler *ctx = video_drvdata(file);
> +       int ret = 0;
> +
> +       /* Check if opened before */
> +       if (ctx->refcount >= FIMC_IS_MAX_INSTANCES) {
> +               pr_err("All instances are in use.\n");
> +               return -EBUSY;
> +       }
> +
> +       INIT_LIST_HEAD(&ctx->wait_queue);
> +       ctx->wait_queue_cnt = 0;
> +       INIT_LIST_HEAD(&ctx->run_queue);
> +       ctx->run_queue_cnt = 0;
> +
> +       ctx->fmt = NULL;
> +       ctx->refcount++;
> +
> +       return ret;

Directly return 0.

> +}
> +
> +static int scaler_video_capture_close(struct file *file)
> +{
> +       struct fimc_is_scaler *ctx = video_drvdata(file);
> +       int ret = 0;
> +
> +       ctx->refcount--;
> +       ctx->capture_state = 0;
> +       vb2_fop_release(file);
> +
> +       return ret;

ditto

-- 
With warm regards,
Sachin
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to