Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fabc4e94 authored by Lad, Prabhakar's avatar Lad, Prabhakar Committed by Mauro Carvalho Chehab
Browse files

[media] media: davinci: vpbe: fix build warning



recent patch with commit id 4f996594
which makes vidioc_s_crop const, was causing a following build warning,
vpbe_display.c: In function 'vpbe_display_s_crop':
vpbe_display.c:640: warning: initialization discards qualifiers from pointer target type
This patch fixes the above build warning.

Signed-off-by: default avatarLad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: default avatarManjunath Hadli <manjunath.hadli@ti.com>
Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ad7dcb33
Loading
Loading
Loading
Loading
+10 −10
Original line number Original line Diff line number Diff line
@@ -637,7 +637,7 @@ static int vpbe_display_s_crop(struct file *file, void *priv,
	struct vpbe_device *vpbe_dev = disp_dev->vpbe_dev;
	struct vpbe_device *vpbe_dev = disp_dev->vpbe_dev;
	struct osd_layer_config *cfg = &layer->layer_info.config;
	struct osd_layer_config *cfg = &layer->layer_info.config;
	struct osd_state *osd_device = disp_dev->osd_device;
	struct osd_state *osd_device = disp_dev->osd_device;
	struct v4l2_rect *rect = &crop->c;
	struct v4l2_rect rect = crop->c;
	int ret;
	int ret;


	v4l2_dbg(1, debug, &vpbe_dev->v4l2_dev,
	v4l2_dbg(1, debug, &vpbe_dev->v4l2_dev,
@@ -648,21 +648,21 @@ static int vpbe_display_s_crop(struct file *file, void *priv,
		return -EINVAL;
		return -EINVAL;
	}
	}


	if (rect->top < 0)
	if (rect.top < 0)
		rect->top = 0;
		rect.top = 0;
	if (rect->left < 0)
	if (rect.left < 0)
		rect->left = 0;
		rect.left = 0;


	vpbe_disp_check_window_params(disp_dev, rect);
	vpbe_disp_check_window_params(disp_dev, &rect);


	osd_device->ops.get_layer_config(osd_device,
	osd_device->ops.get_layer_config(osd_device,
			layer->layer_info.id, cfg);
			layer->layer_info.id, cfg);


	vpbe_disp_calculate_scale_factor(disp_dev, layer,
	vpbe_disp_calculate_scale_factor(disp_dev, layer,
					rect->width,
					rect.width,
					rect->height);
					rect.height);
	vpbe_disp_adj_position(disp_dev, layer, rect->top,
	vpbe_disp_adj_position(disp_dev, layer, rect.top,
					rect->left);
					rect.left);
	ret = osd_device->ops.set_layer_config(osd_device,
	ret = osd_device->ops.set_layer_config(osd_device,
				layer->layer_info.id, cfg);
				layer->layer_info.id, cfg);
	if (ret < 0) {
	if (ret < 0) {