difos/target/linux/bcm27xx/patches-6.12/950-0338-bcm2835-unicam-hacks-to-allow-it-to-build.patch
Álvaro Fernández Rojas 8f9e91ad03 bcm27xx: add 6.12 patches from RPi repo
These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.12.y
With the following command:
git format-patch -N v6.12.27..HEAD
(HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e)

Exceptions:
- (def)configs patches
- github workflows patches
- applied & reverted patches
- readme patches
- wireless patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-05-21 11:32:18 +02:00

57 lines
2 KiB
Diff

From ccebf925f4179e7de21efdada193ba8f6d6929e7 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com>
Date: Wed, 13 Sep 2023 18:53:21 +0100
Subject: [PATCH] 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;