diff --git a/Makefile b/Makefile index 47faf16c..218447b7 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,9 @@ subdir-ccflags-y += -DNV_I2C_LEGACY_PROBE_NEW_REMOVED # API changes to replace u8 with unsigned char subdir-ccflags-y += -DNV_TTY_SERIAL_TYPE_U8_CHANGE + +# v4l2_async_subdev is renamed to v4l2_async_connection. +subdir-ccflags-y += -DNV_V4L2_ASYNC_SUBDEV_RENAME endif ifeq ($(CONFIG_TEGRA_VIRTUALIZATION),y) diff --git a/drivers/media/platform/tegra/camera/vi/graph.c b/drivers/media/platform/tegra/camera/vi/graph.c index 45015fee..7a80cb48 100644 --- a/drivers/media/platform/tegra/camera/vi/graph.c +++ b/drivers/media/platform/tegra/camera/vi/graph.c @@ -341,9 +341,15 @@ register_device_error: return ret; } +#if defined(NV_V4L2_ASYNC_SUBDEV_RENAME) +static int tegra_vi_graph_notify_bound(struct v4l2_async_notifier *notifier, + struct v4l2_subdev *subdev, + struct v4l2_async_connection *asd) +#else static int tegra_vi_graph_notify_bound(struct v4l2_async_notifier *notifier, struct v4l2_subdev *subdev, struct v4l2_async_subdev *asd) +#endif { struct tegra_channel *chan = container_of(notifier, struct tegra_channel, notifier); @@ -374,9 +380,15 @@ static int tegra_vi_graph_notify_bound(struct v4l2_async_notifier *notifier, return -EINVAL; } +#if defined(NV_V4L2_ASYNC_SUBDEV_RENAME) +static void tegra_vi_graph_notify_unbind(struct v4l2_async_notifier *notifier, + struct v4l2_subdev *subdev, + struct v4l2_async_connection *asd) +#else static void tegra_vi_graph_notify_unbind(struct v4l2_async_notifier *notifier, struct v4l2_subdev *subdev, struct v4l2_async_subdev *asd) +#endif { struct tegra_channel *chan = container_of(notifier, struct tegra_channel, notifier); diff --git a/include/media/mc_common.h b/include/media/mc_common.h index deed6b25..f10bde3d 100644 --- a/include/media/mc_common.h +++ b/include/media/mc_common.h @@ -94,7 +94,11 @@ struct tegra_vi_graph_entity { struct device_node *node; struct media_entity *entity; +#if defined(NV_V4L2_ASYNC_SUBDEV_RENAME) + struct v4l2_async_connection asd; +#else struct v4l2_async_subdev asd; +#endif struct v4l2_subdev *subdev; };