On Wed, 22 Feb 2012, javier Martin wrote: > >>> @@ -1087,6 +1298,18 @@ static int mx2_camera_set_fmt(struct soc_camera_device *icd, > >>> if (ret < 0 && ret != -ENOIOCTLCMD) > >>> return ret; > >>> > >>> + /* Store width and height returned by the sensor for resizing */ > >>> + pcdev->s_width = mf.width; > >>> + pcdev->s_height = mf.height; > >>> + dev_dbg(icd->parent, "%s: sensor params: width = %d, height = %d\n", > >>> + __func__, pcdev->s_width, pcdev->s_height); > >>> + > >>> + memset(pcdev->resizing, 0, sizeof(struct emma_prp_resize) << 1); > >> > >> I think, just sizeof(pcdev->resizing) will do the trick. > > No, it doesn't work because pcdev->resizing is a pointer whose size is > 4bytes. Sorry? + struct emma_prp_resize resizing[2]; .resizing is an array of 2 "struct emma_prp_resize" objects. Thanks Guennadi > I will just left this unchanged with your permission. > > Regards. > -- > Javier Martin > Vista Silicon S.L. > CDTUC - FASE C - Oficina S-345 > Avda de los Castros s/n > 39005- Santander. Cantabria. Spain > +34 942 25 32 60 > www.vista-silicon.com > --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html