mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
media: camera: vi: Rename v4l2_async_notifier_init to v4l2_async_subdev_nf_init()
The API v4l2_async_notifier_init() changed to v4l2_async_subdev_nf_init() in Linux 6.6 with below kernel change: --- commit bda8953e8c3e7ecbbf6cb1be11790496300e3961 Author: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Date: Tue Apr 18 11:52:07 2023 +0200 media: v4l: async: Drop v4l2_async_nf_parse_fwnode_endpoints() --- Use the new API. Bug 4346767 Change-Id: Iff3137d07cd270300c4b9a90974a4dd81fb53740 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3008087 GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
d519482993
commit
1cae6bd4d7
3
Makefile
3
Makefile
@@ -43,6 +43,9 @@ subdir-ccflags-y += -DNV_V4L2_ASYNC_SUBDEV_RENAME
|
|||||||
|
|
||||||
# Rename V4L2_ASYNC_MATCH_FWNODE to V4L2_ASYNC_MATCH_TYPE_FWNODE
|
# Rename V4L2_ASYNC_MATCH_FWNODE to V4L2_ASYNC_MATCH_TYPE_FWNODE
|
||||||
subdir-ccflags-y += -DNV_V4L2_ASYNC_MATCH_FWNODE_RENAME
|
subdir-ccflags-y += -DNV_V4L2_ASYNC_MATCH_FWNODE_RENAME
|
||||||
|
|
||||||
|
# Rename async_nf_init and v4l2_async_subdev_nf_register
|
||||||
|
subdir-ccflags-y += -DNV_V4L2_ASYNC_NF_SUBDEVICE_INIT_RENAME
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_TEGRA_VIRTUALIZATION),y)
|
ifeq ($(CONFIG_TEGRA_VIRTUALIZATION),y)
|
||||||
|
|||||||
@@ -668,10 +668,23 @@ int tegra_vi_graph_init(struct tegra_mc_vi *vi)
|
|||||||
v4l2_async_notifier_init(&chan->notifier);
|
v4l2_async_notifier_init(&chan->notifier);
|
||||||
list_for_each_entry(entity, &chan->entities, list)
|
list_for_each_entry(entity, &chan->entities, list)
|
||||||
__v4l2_async_notifier_add_subdev(&chan->notifier, &entity->asd);
|
__v4l2_async_notifier_add_subdev(&chan->notifier, &entity->asd);
|
||||||
|
#else
|
||||||
|
#if defined (NV_V4L2_ASYNC_NF_SUBDEVICE_INIT_RENAME)
|
||||||
|
v4l2_async_subdev_nf_init(&chan->notifier, tegra_channel_find_linked_csi_subdev(chan));
|
||||||
|
list_for_each_entry(entity, &chan->entities, list) {
|
||||||
|
struct v4l2_async_connection *asd;
|
||||||
|
asd = v4l2_async_nf_add_fwnode_remote(&chan->notifier, of_fwnode_handle(remote),
|
||||||
|
struct v4l2_async_connection);
|
||||||
|
if (IS_ERR(asd)) {
|
||||||
|
ret = PTR_ERR(asd);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
v4l2_async_nf_init(&chan->notifier);
|
v4l2_async_nf_init(&chan->notifier);
|
||||||
list_for_each_entry(entity, &chan->entities, list)
|
list_for_each_entry(entity, &chan->entities, list)
|
||||||
__v4l2_async_nf_add_subdev(&chan->notifier, &entity->asd);
|
__v4l2_async_nf_add_subdev(&chan->notifier, &entity->asd);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
chan->link_status = 0;
|
chan->link_status = 0;
|
||||||
@@ -681,10 +694,14 @@ int tegra_vi_graph_init(struct tegra_mc_vi *vi)
|
|||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0)
|
||||||
ret = v4l2_async_notifier_register(&vi->v4l2_dev,
|
ret = v4l2_async_notifier_register(&vi->v4l2_dev,
|
||||||
&chan->notifier);
|
&chan->notifier);
|
||||||
|
#else
|
||||||
|
#if defined (NV_V4L2_ASYNC_NF_SUBDEVICE_INIT_RENAME)
|
||||||
|
ret = v4l2_async_nf_register(&chan->notifier);
|
||||||
#else
|
#else
|
||||||
ret = v4l2_async_nf_register(&vi->v4l2_dev,
|
ret = v4l2_async_nf_register(&vi->v4l2_dev,
|
||||||
&chan->notifier);
|
&chan->notifier);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
dev_err(vi->dev, "CONFIG_V4L2_ASYNC is not enabled!\n");
|
dev_err(vi->dev, "CONFIG_V4L2_ASYNC is not enabled!\n");
|
||||||
ret = -ENOTSUPP;
|
ret = -ENOTSUPP;
|
||||||
|
|||||||
Reference in New Issue
Block a user