Re: [PATCH/RFC v2 4/4] v4l: Update subdev drivers to handle framesamples parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Laurent,

On 12/06/2011 05:12 PM, Laurent Pinchart wrote:
> On Thursday 01 December 2011 11:20:53 Sylwester Nawrocki wrote:
>> Update the sub-device drivers having a devnode enabled so they properly
>> handle the new framesamples field of struct v4l2_mbus_framefmt.
>> These drivers don't support compressed (entropy encoded) formats so the
>> framesamples field is simply initialized to 0.
> 
> Wouldn't it be better to memset the whole structure before filling it ? This 
> would handle reserved fields as well. One option would be to make the caller 

Sounds like a good improvement to me. Then we wouldn't have to do any
modifications when in future someone converts the reserved field into
something useful.

> zero the structure, I think that would likely result in a smaller patch.

Do you mean to memset the whole structure before v4l2_subdev_call, in
subdev_do_ioctl() ? I guess no, since it could only be done for get_fmt.

> 
>> There is a few other drivers that expose a devnode (mt9p031, mt9t001,
>> mt9v032) but they already implicitly initialize the new data structure
>> field to 0, so they don't need to be touched.


Regards,
-- 
Sylwester Nawrocki
Samsung Poland R&D Center
--
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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux