1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/6.6/target/linux/bcm27xx/patches-6.6/0642-media-rp1-fe-Use-0-not-1-when-working-with-unsigned-.patch
Ycarus (Yannick Chabanois) 12de1d2995 Add RPI kernel 6.6 support
2024-04-05 20:55:33 +02:00

38 lines
1.5 KiB
Diff

From 8404993dfa439c54b0017974dacce69586f176de Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Date: Thu, 21 Sep 2023 16:03:07 +0300
Subject: [PATCH 0642/1002] media: rp1: fe: Use ~0, not -1, when working with
unsigned values
Use ~0, not -1, when working with unsigned values (-1 is not unsigned).
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
drivers/media/platform/raspberrypi/rp1_cfe/pisp_fe.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/raspberrypi/rp1_cfe/pisp_fe.c b/drivers/media/platform/raspberrypi/rp1_cfe/pisp_fe.c
index 91a3b5f6e53c..a97d0102e055 100644
--- a/drivers/media/platform/raspberrypi/rp1_cfe/pisp_fe.c
+++ b/drivers/media/platform/raspberrypi/rp1_cfe/pisp_fe.c
@@ -372,7 +372,7 @@ void pisp_fe_submit_job(struct pisp_fe_device *fe, struct vb2_buffer **vb2_bufs,
void pisp_fe_start(struct pisp_fe_device *fe)
{
pisp_fe_reg_write(fe, FE_CONTROL, FE_CONTROL_RESET);
- pisp_fe_reg_write(fe, FE_INT_STATUS, -1);
+ pisp_fe_reg_write(fe, FE_INT_STATUS, ~0);
pisp_fe_reg_write(fe, FE_INT_EN, FE_INT_EOF | FE_INT_SOF | FE_INT_LINES0 | FE_INT_LINES1);
fe->inframe_count = 0;
}
@@ -383,7 +383,7 @@ void pisp_fe_stop(struct pisp_fe_device *fe)
pisp_fe_reg_write(fe, FE_CONTROL, FE_CONTROL_ABORT);
usleep_range(1000, 2000);
WARN_ON(pisp_fe_reg_read(fe, FE_STATUS));
- pisp_fe_reg_write(fe, FE_INT_STATUS, -1);
+ pisp_fe_reg_write(fe, FE_INT_STATUS, ~0);
}
static struct pisp_fe_device *to_pisp_fe_device(struct v4l2_subdev *subdev)
--
2.44.0