mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
media: qcom: camss: simplify camss_subdev_notifier_complete() function
For sake of code simplicity and readability reduce the function code by one level of indentation, the change is non-functional. Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> [bod: Fixed indentation error] Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
parent
0d9f889fed
commit
6181e48f53
1 changed files with 25 additions and 25 deletions
|
@ -3386,35 +3386,35 @@ static int camss_subdev_notifier_complete(struct v4l2_async_notifier *async)
|
|||
struct camss *camss = container_of(async, struct camss, notifier);
|
||||
struct v4l2_device *v4l2_dev = &camss->v4l2_dev;
|
||||
struct v4l2_subdev *sd;
|
||||
int ret;
|
||||
|
||||
list_for_each_entry(sd, &v4l2_dev->subdevs, list) {
|
||||
if (sd->host_priv) {
|
||||
struct media_entity *sensor = &sd->entity;
|
||||
struct csiphy_device *csiphy =
|
||||
(struct csiphy_device *) sd->host_priv;
|
||||
struct media_entity *input = &csiphy->subdev.entity;
|
||||
unsigned int i;
|
||||
struct csiphy_device *csiphy = sd->host_priv;
|
||||
struct media_entity *input, *sensor;
|
||||
unsigned int i;
|
||||
int ret;
|
||||
|
||||
for (i = 0; i < sensor->num_pads; i++) {
|
||||
if (sensor->pads[i].flags & MEDIA_PAD_FL_SOURCE)
|
||||
break;
|
||||
}
|
||||
if (i == sensor->num_pads) {
|
||||
dev_err(camss->dev,
|
||||
"No source pad in external entity\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!csiphy)
|
||||
continue;
|
||||
|
||||
ret = media_create_pad_link(sensor, i,
|
||||
input, MSM_CSIPHY_PAD_SINK,
|
||||
MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED);
|
||||
if (ret < 0) {
|
||||
camss_link_err(camss, sensor->name,
|
||||
input->name,
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
input = &csiphy->subdev.entity;
|
||||
sensor = &sd->entity;
|
||||
|
||||
for (i = 0; i < sensor->num_pads; i++) {
|
||||
if (sensor->pads[i].flags & MEDIA_PAD_FL_SOURCE)
|
||||
break;
|
||||
}
|
||||
if (i == sensor->num_pads) {
|
||||
dev_err(camss->dev,
|
||||
"No source pad in external entity\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = media_create_pad_link(sensor, i, input,
|
||||
MSM_CSIPHY_PAD_SINK,
|
||||
MEDIA_LNK_FL_IMMUTABLE | MEDIA_LNK_FL_ENABLED);
|
||||
if (ret < 0) {
|
||||
camss_link_err(camss, sensor->name, input->name, ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue