1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00
openmptcprouter/6.12/target/linux/bcm27xx/patches-6.12/950-0340-bcm2835-unicam-hacks-to-allow-it-to-build.patch
Ycarus (Yannick Chabanois) bdb9b0046f Add bcm27xx 6.12 test support
2024-12-20 14:17:26 +01:00

57 lines
2 KiB
Diff

From 0b4b7dcfffe8ee356d1211adc3ddc514f2156a99 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com>
Date: Wed, 13 Sep 2023 18:53:21 +0100
Subject: [PATCH 340/697] bcm2835-unicam: hacks to allow it to build
media: bcm2835-unicam: Fix up async notifier usage
Fixes "8a090fc3e549 bcm2835-unicam: hacks to allow it to build"
---
drivers/media/platform/bcm2835/bcm2835-unicam.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--- a/drivers/media/platform/bcm2835/bcm2835-unicam.c
+++ b/drivers/media/platform/bcm2835/bcm2835-unicam.c
@@ -516,7 +516,7 @@ struct unicam_device {
struct kref kref;
/* V4l2 specific parameters */
- struct v4l2_async_subdev asd;
+ struct v4l2_async_connection *asd;
/* peripheral base address */
void __iomem *base;
@@ -2791,7 +2791,7 @@ static const struct v4l2_file_operations
static int
unicam_async_bound(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *subdev,
- struct v4l2_async_subdev *asd)
+ struct v4l2_async_connection *asd)
{
struct unicam_device *unicam = to_unicam_device(notifier->v4l2_dev);
@@ -3324,18 +3324,18 @@ static int of_unicam_connect_subdevs(str
dev->max_data_lanes, dev->bus_flags);
/* Initialize and register the async notifier. */
- v4l2_async_nf_init(&dev->notifier);
+ v4l2_async_nf_init(&dev->notifier, &dev->v4l2_dev);
dev->notifier.ops = &unicam_async_ops;
- dev->asd.match_type = V4L2_ASYNC_MATCH_FWNODE;
- dev->asd.match.fwnode = fwnode_graph_get_remote_endpoint(of_fwnode_handle(ep_node));
- ret = __v4l2_async_nf_add_subdev(&dev->notifier, &dev->asd);
- if (ret) {
+ dev->asd = v4l2_async_nf_add_fwnode(&dev->notifier,
+ of_fwnode_handle(sensor_node),
+ struct v4l2_async_connection);
+ if (IS_ERR(dev->asd)) {
unicam_err(dev, "Error adding subdevice: %d\n", ret);
goto cleanup_exit;
}
- ret = v4l2_async_nf_register(&dev->v4l2_dev, &dev->notifier);
+ ret = v4l2_async_nf_register(&dev->notifier);
if (ret) {
unicam_err(dev, "Error registering async notifier: %d\n", ret);
ret = -EINVAL;