lkml.org 
[lkml]   [2021]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v10, 11/19] media: mtk-vcodec: Generalize power and clock on/off interfaces
On Thu, Nov 11, 2021 at 12:14:52PM +0800, Yunfei Dong wrote:
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_util.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_util.c
[...]
> +void *mtk_vcodec_get_hw_dev(struct mtk_vcodec_dev *dev, int hw_idx)
> {
[...]
> +
> + if (dev->subdev_dev[hw_idx])
> + return dev->subdev_dev[hw_idx];
> +
> + node = dev->subdev_node[hw_idx];
> + if (!node) {
> + mtk_v4l2_err("Get lat node fail:%d", hw_idx);
> + return NULL;
> + }
> +
> + hw_pdev = of_find_device_by_node(node);
> + of_node_put(node);

Raised the question in [v10,06/19] media: mtk-vcodec: Manage multi hardware information[1], is the reference count borrowed from mtk_vcodec_subdev_device_check? If so, it needs comments for documentation.

[1]: https://patchwork.linuxtv.org/project/linux-media/patch/20211111041500.17363-7-yunfei.dong@mediatek.com/

\
 
 \ /
  Last update: 2021-11-16 10:25    [W:0.091 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site