Commit fdab089e authored by Dafna Hirschfeld's avatar Dafna Hirschfeld Committed by Mauro Carvalho Chehab
Browse files

media: staging: rkisp1: don't lock media's graph_mutex when calling rkisp1_create_links



The function rkisp1_create_links calls media_entity_get_fwnode_pad
and media_create_pad_link in the mc api. Those calls don't require
locking the graph_mutex so remove the locking.

Signed-off-by: default avatarDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: default avatarHelen Koike <helen.koike@collabora.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent a3fbc2e6
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -220,19 +220,17 @@ static int rkisp1_subdev_notifier_complete(struct v4l2_async_notifier *notifier)
		container_of(notifier, struct rkisp1_device, notifier);
	int ret;

	mutex_lock(&rkisp1->media_dev.graph_mutex);
	ret = rkisp1_create_links(rkisp1);
	if (ret)
		goto unlock;
		return ret;

	ret = v4l2_device_register_subdev_nodes(&rkisp1->v4l2_dev);
	if (ret)
		goto unlock;
		return ret;

	dev_dbg(rkisp1->dev, "Async subdev notifier completed\n");

unlock:
	mutex_unlock(&rkisp1->media_dev.graph_mutex);
	return ret;
	return 0;
}

static int rkisp1_fwnode_parse(struct device *dev,