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

Commit 035aa147 authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Mauro Carvalho Chehab
Browse files

[media] media: vb2: change plane sizes array to unsigned int[]



Plane sizes array was declared as unsigned long[], while unsigned int is
more than enough for storing size of the video buffer. This patch reduces
the size of the array by definiting it as unsigned int[].

Reported-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 25a27d91
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ static int atmel_isi_wait_status(struct atmel_isi *isi, int wait_reset)
	Videobuf operations
   ------------------------------------------------------------------*/
static int queue_setup(struct vb2_queue *vq, unsigned int *nbuffers,
				unsigned int *nplanes, unsigned long sizes[],
				unsigned int *nplanes, unsigned int sizes[],
				void *alloc_ctxs[])
{
	struct soc_camera_device *icd = soc_camera_from_vb2q(vq);
+1 −1
Original line number Diff line number Diff line
@@ -884,7 +884,7 @@ static int mcam_read_setup(struct mcam_camera *cam)
 */

static int mcam_vb_queue_setup(struct vb2_queue *vq, unsigned int *nbufs,
		unsigned int *num_planes, unsigned long sizes[],
		unsigned int *num_planes, unsigned int sizes[],
		void *alloc_ctxs[])
{
	struct mcam_camera *cam = vb2_get_drv_priv(vq);
+1 −1
Original line number Diff line number Diff line
@@ -739,7 +739,7 @@ static const struct v4l2_ioctl_ops m2mtest_ioctl_ops = {
 */

static int m2mtest_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers,
				unsigned int *nplanes, unsigned long sizes[],
				unsigned int *nplanes, unsigned int sizes[],
				void *alloc_ctxs[])
{
	struct m2mtest_ctx *ctx = vb2_get_drv_priv(vq);
+1 −1
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ static void mx3_cam_dma_done(void *arg)
 */
static int mx3_videobuf_setup(struct vb2_queue *vq,
			unsigned int *count, unsigned int *num_planes,
			unsigned long sizes[], void *alloc_ctxs[])
			unsigned int sizes[], void *alloc_ctxs[])
{
	struct soc_camera_device *icd = soc_camera_from_vb2q(vq);
	struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
+1 −1
Original line number Diff line number Diff line
@@ -745,7 +745,7 @@ static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma)
/* Videobuf2 operations */

static int queue_setup(struct vb2_queue *vq, unsigned int *nbuffers,
				unsigned int *nplanes, unsigned long sizes[],
				unsigned int *nplanes, unsigned int sizes[],
				void *alloc_ctxs[])
{
	struct pwc_device *pdev = vb2_get_drv_priv(vq);
Loading