Re: [RFC v2 06/10] exynos5-fimc-is: Adds isp subdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31 May 2013 18:33, Arun Kumar K <arun.kk@xxxxxxxxxxx> wrote:
> fimc-is driver takes video data input from the ISP video node
> which is added in this patch. This node accepts Bayer input
> buffers which is given from the IS sensors.
>
> Signed-off-by: Arun Kumar K <arun.kk@xxxxxxxxxxx>
> Signed-off-by: Kilyeon Im <kilyeon.im@xxxxxxxxxxx>
> ---
[snip]


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

You can directly return 0 here instead of creating a local variable
'ret' which is not used anywhere else.

> +}
> +
> +static int isp_video_output_close(struct file *file)
> +{
> +       struct fimc_is_isp *isp = video_drvdata(file);
> +       int ret = 0;
> +
> +       isp->refcount--;
> +       isp->output_state = 0;
> +       vb2_fop_release(file);
> +       return ret;

ditto

> +}
> +
> +static const struct v4l2_file_operations isp_video_output_fops = {
> +       .owner          = THIS_MODULE,
> +       .open           = isp_video_output_open,
> +       .release        = isp_video_output_close,
> +       .poll           = vb2_fop_poll,
> +       .unlocked_ioctl = video_ioctl2,
> +       .mmap           = vb2_fop_mmap,
> +};
> +

nit: Please consider changing "Adds" to "Add" in the patch titles of
this series during the next spin.

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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux