[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a24b19a835430064a0677e04d746f72ae7987a3c.1651223992.git.quic_nvaskenl@quicinc.com>
Date: Fri, 29 Apr 2022 17:15:03 +0530
From: Naina Vaskenly <quic_nvaskenl@...cinc.com>
To: Mauro Carvalho Chehab <mchehab@...nel.org>,
lijian <lijian@...ong.com>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
<linux-media@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: Kumar Anshuman <quic_anshuk@...cinc.com>,
Naina Vaskenly <quic_nvaskenl@...cinc.com>
Subject: [PATCH V0 1/1] media: v4l2-core: Enable reserved field of v4l2_event
'reserved' member of struct v4l2_event is currently not enabled.
This field can be used to transfer data, if >64 bytes of data
has to be sent. Hence, added this change to copy the reserved field in
__v4l2_event_queue_fh.
Signed-off-by: Naina Vaskenly <quic_nvaskenl@...cinc.com>
---
drivers/media/v4l2-core/v4l2-event.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/v4l2-event.c b/drivers/media/v4l2-core/v4l2-event.c
index c5ce9f1..3d741cb 100644
--- a/drivers/media/v4l2-core/v4l2-event.c
+++ b/drivers/media/v4l2-core/v4l2-event.c
@@ -137,8 +137,10 @@ static void __v4l2_event_queue_fh(struct v4l2_fh *fh,
/* Take one and fill it. */
kev = sev->events + sev_pos(sev, sev->in_use);
kev->event.type = ev->type;
- if (copy_payload)
+ if (copy_payload) {
kev->event.u = ev->u;
+ memcpy(kev->event.reserved, ev->reserved, sizeof(ev->reserved));
+ }
kev->event.id = ev->id;
kev->ts = ts;
kev->event.sequence = fh->sequence;
--
2.7.4
Powered by blists - more mailing lists