f468b7ac48aa2ae642816bf074795587b0d18138
[openwrt/staging/ldir.git] /
1 From 455c4ae2c70348a5842835d2f67f7cd8e665a2a6 Mon Sep 17 00:00:00 2001
2 From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
3 Date: Thu, 21 Sep 2023 16:03:07 +0300
4 Subject: [PATCH] media: rp1: fe: Use ~0, not -1, when working with unsigned
5 values
6
7 Use ~0, not -1, when working with unsigned values (-1 is not unsigned).
8
9 Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
10 ---
11 drivers/media/platform/raspberrypi/rp1_cfe/pisp_fe.c | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-)
13
14 --- a/drivers/media/platform/raspberrypi/rp1_cfe/pisp_fe.c
15 +++ b/drivers/media/platform/raspberrypi/rp1_cfe/pisp_fe.c
16 @@ -372,7 +372,7 @@ void pisp_fe_submit_job(struct pisp_fe_d
17 void pisp_fe_start(struct pisp_fe_device *fe)
18 {
19 pisp_fe_reg_write(fe, FE_CONTROL, FE_CONTROL_RESET);
20 - pisp_fe_reg_write(fe, FE_INT_STATUS, -1);
21 + pisp_fe_reg_write(fe, FE_INT_STATUS, ~0);
22 pisp_fe_reg_write(fe, FE_INT_EN, FE_INT_EOF | FE_INT_SOF | FE_INT_LINES0 | FE_INT_LINES1);
23 fe->inframe_count = 0;
24 }
25 @@ -383,7 +383,7 @@ void pisp_fe_stop(struct pisp_fe_device
26 pisp_fe_reg_write(fe, FE_CONTROL, FE_CONTROL_ABORT);
27 usleep_range(1000, 2000);
28 WARN_ON(pisp_fe_reg_read(fe, FE_STATUS));
29 - pisp_fe_reg_write(fe, FE_INT_STATUS, -1);
30 + pisp_fe_reg_write(fe, FE_INT_STATUS, ~0);
31 }
32
33 static struct pisp_fe_device *to_pisp_fe_device(struct v4l2_subdev *subdev)