mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
media: qcom: camss: unconditionally set async notifier of subdevices
For sake of simplicity it makes sense to register all CAMSS subdevices from its async notifier, this will cover all possible use cases, even if there is no connected sensors to the CAMSS ISP. Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Tested-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
17ad461622
commit
605af91e90
|
|
@ -4151,7 +4151,6 @@ static int camss_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct camss *camss;
|
||||
int num_subdevs;
|
||||
int ret;
|
||||
|
||||
camss = devm_kzalloc(dev, sizeof(*camss), GFP_KERNEL);
|
||||
|
|
@ -4222,11 +4221,9 @@ static int camss_probe(struct platform_device *pdev)
|
|||
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
num_subdevs = camss_of_parse_ports(camss);
|
||||
if (num_subdevs < 0) {
|
||||
ret = num_subdevs;
|
||||
ret = camss_of_parse_ports(camss);
|
||||
if (ret < 0)
|
||||
goto err_v4l2_device_unregister;
|
||||
}
|
||||
|
||||
ret = camss_register_entities(camss);
|
||||
if (ret < 0)
|
||||
|
|
@ -4242,23 +4239,12 @@ static int camss_probe(struct platform_device *pdev)
|
|||
goto err_register_subdevs;
|
||||
}
|
||||
|
||||
if (num_subdevs) {
|
||||
camss->notifier.ops = &camss_subdev_notifier_ops;
|
||||
|
||||
ret = v4l2_async_nf_register(&camss->notifier);
|
||||
if (ret) {
|
||||
dev_err(dev,
|
||||
"Failed to register async subdev nodes: %d\n",
|
||||
ret);
|
||||
goto err_media_device_unregister;
|
||||
}
|
||||
} else {
|
||||
ret = v4l2_device_register_subdev_nodes(&camss->v4l2_dev);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "Failed to register subdev nodes: %d\n",
|
||||
ret);
|
||||
goto err_media_device_unregister;
|
||||
}
|
||||
camss->notifier.ops = &camss_subdev_notifier_ops;
|
||||
ret = v4l2_async_nf_register(&camss->notifier);
|
||||
if (ret) {
|
||||
dev_err(dev,
|
||||
"Failed to register async subdev nodes: %d\n", ret);
|
||||
goto err_media_device_unregister;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user