Skip to content

Commit 7c367d8

Browse files
committed
Merge tag 'media/v6.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab: - a core fix: Don't report V4L2_SUBDEV_CAP_STREAMS when API is disabled - ipu-bridge: Add a missing acpi_dev_put() - ov8858: fix driver for probe to work after 6.6-rc1 - xilinx-vipp: fix async notifier logic * tag 'media/v6.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: i2c: ov8858: Don't set fwnode in the driver media: ipu-bridge: Add missing acpi_dev_put() in ipu_bridge_get_ivsc_acpi_dev() media: xilinx-vipp: Look for entities also in waiting_list media: subdev: Don't report V4L2_SUBDEV_CAP_STREAMS when the streams API is disabled
2 parents 10a6e5f + c46f16f commit 7c367d8

File tree

4 files changed

+24
-14
lines changed

4 files changed

+24
-14
lines changed

drivers/media/i2c/ov8858.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,9 +1850,9 @@ static int ov8858_parse_of(struct ov8858 *ov8858)
18501850
}
18511851

18521852
ret = v4l2_fwnode_endpoint_parse(endpoint, &vep);
1853+
fwnode_handle_put(endpoint);
18531854
if (ret) {
18541855
dev_err(dev, "Failed to parse endpoint: %d\n", ret);
1855-
fwnode_handle_put(endpoint);
18561856
return ret;
18571857
}
18581858

@@ -1864,12 +1864,9 @@ static int ov8858_parse_of(struct ov8858 *ov8858)
18641864
default:
18651865
dev_err(dev, "Unsupported number of data lanes %u\n",
18661866
ov8858->num_lanes);
1867-
fwnode_handle_put(endpoint);
18681867
return -EINVAL;
18691868
}
18701869

1871-
ov8858->subdev.fwnode = endpoint;
1872-
18731870
return 0;
18741871
}
18751872

@@ -1913,7 +1910,7 @@ static int ov8858_probe(struct i2c_client *client)
19131910

19141911
ret = ov8858_init_ctrls(ov8858);
19151912
if (ret)
1916-
goto err_put_fwnode;
1913+
return ret;
19171914

19181915
sd = &ov8858->subdev;
19191916
sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
@@ -1964,8 +1961,6 @@ static int ov8858_probe(struct i2c_client *client)
19641961
media_entity_cleanup(&sd->entity);
19651962
err_free_handler:
19661963
v4l2_ctrl_handler_free(&ov8858->ctrl_handler);
1967-
err_put_fwnode:
1968-
fwnode_handle_put(ov8858->subdev.fwnode);
19691964

19701965
return ret;
19711966
}
@@ -1978,7 +1973,6 @@ static void ov8858_remove(struct i2c_client *client)
19781973
v4l2_async_unregister_subdev(sd);
19791974
media_entity_cleanup(&sd->entity);
19801975
v4l2_ctrl_handler_free(&ov8858->ctrl_handler);
1981-
fwnode_handle_put(ov8858->subdev.fwnode);
19821976

19831977
pm_runtime_disable(&client->dev);
19841978
if (!pm_runtime_status_suspended(&client->dev))

drivers/media/pci/intel/ipu-bridge.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ static struct acpi_device *ipu_bridge_get_ivsc_acpi_dev(struct acpi_device *adev
107107
for_each_acpi_dev_match(ivsc_adev, acpi_id->id, NULL, -1)
108108
/* camera sensor depends on IVSC in DSDT if exist */
109109
for_each_acpi_consumer_dev(ivsc_adev, consumer)
110-
if (consumer->handle == handle)
110+
if (consumer->handle == handle) {
111+
acpi_dev_put(consumer);
111112
return ivsc_adev;
113+
}
112114
}
113115

114116
return NULL;

drivers/media/platform/xilinx/xilinx-vipp.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,18 @@ xvip_graph_find_entity(struct xvip_composite_device *xdev,
5555
{
5656
struct xvip_graph_entity *entity;
5757
struct v4l2_async_connection *asd;
58-
59-
list_for_each_entry(asd, &xdev->notifier.done_list, asc_entry) {
60-
entity = to_xvip_entity(asd);
61-
if (entity->asd.match.fwnode == fwnode)
62-
return entity;
58+
struct list_head *lists[] = {
59+
&xdev->notifier.done_list,
60+
&xdev->notifier.waiting_list
61+
};
62+
unsigned int i;
63+
64+
for (i = 0; i < ARRAY_SIZE(lists); i++) {
65+
list_for_each_entry(asd, lists[i], asc_entry) {
66+
entity = to_xvip_entity(asd);
67+
if (entity->asd.match.fwnode == fwnode)
68+
return entity;
69+
}
6370
}
6471

6572
return NULL;

drivers/media/v4l2-core/v4l2-subdev.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,13 @@ static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg,
502502
V4L2_SUBDEV_CLIENT_CAP_STREAMS;
503503
int rval;
504504

505+
/*
506+
* If the streams API is not enabled, remove V4L2_SUBDEV_CAP_STREAMS.
507+
* Remove this when the API is no longer experimental.
508+
*/
509+
if (!v4l2_subdev_enable_streams_api)
510+
streams_subdev = false;
511+
505512
switch (cmd) {
506513
case VIDIOC_SUBDEV_QUERYCAP: {
507514
struct v4l2_subdev_capability *cap = arg;

0 commit comments

Comments
 (0)