1 From 18d7a1b078978858569a03e4c0d373ac50f6d283 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Thu, 24 Jan 2019 16:20:38 +0000
4 Subject: [PATCH 329/725] staging: bcm2835-camera: Correct ctrl
5 min/max/step/def to 64bit
7 The V4L2 control API was expanded to take 64 bit values in commit
8 0ba2aeb6dab (Apr 16 2014), but as this driver wasn't in the mainline
9 kernel at that point this was overlooked.
11 Update to use 64 bit values. This also fixes a couple of warnings
14 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
16 .../vc04_services/bcm2835-camera/controls.c | 14 +++++++-------
17 1 file changed, 7 insertions(+), 7 deletions(-)
19 --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c
20 +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c
21 @@ -78,10 +78,10 @@ struct bm2835_mmal_v4l2_ctrl {
22 /* control minimum value or
23 * mask for MMAL_CONTROL_TYPE_STD_MENU
26 - s32 max; /* maximum value of control */
27 - s32 def; /* default value of control */
28 - s32 step; /* step size of the control */
30 + s64 max; /* maximum value of control */
31 + s64 def; /* default value of control */
32 + u64 step; /* step size of the control */
33 const s64 *imenu; /* integer menu array */
34 u32 mmal_id; /* mmal parameter id */
35 bm2835_mmal_v4l2_ctrl_cb *setter;
36 @@ -1244,7 +1244,7 @@ int bm2835_mmal_init_controls(struct bm2
38 case MMAL_CONTROL_TYPE_STD_MENU:
40 - int mask = ctrl->min;
41 + u64 mask = ctrl->min;
43 if (ctrl->id == V4L2_CID_SCENE_MODE) {
44 /* Special handling to work out the mask
45 @@ -1254,11 +1254,11 @@ int bm2835_mmal_init_controls(struct bm2
49 - mask = 1 << V4L2_SCENE_MODE_NONE;
50 + mask = BIT(V4L2_SCENE_MODE_NONE);
52 i < ARRAY_SIZE(scene_configs);
54 - mask |= 1 << scene_configs[i].v4l2_scene;
55 + mask |= BIT(scene_configs[i].v4l2_scene);