• T
    V4L/DVB (10812): v4l2: Zero out read-only ioctls in one place · 337f9d20
    Trent Piepho 提交于
    If an ioctl is read-only then the driver fills in all the fields.  Lots of
    times drivers only care about some fields so it's best if video_ioctl2
    takes care of zeroing out the entire structure before handing it to the
    driver.  This saves code in each driver to do it and driver authors often
    forget.
    
    The existing memset code in some of the read-only ioctl handlers
    can be deleted.
    
    Convert a case statement to a single if statement.
    
    Deleted a debug line from ENUMAUDOUT that was copy-and-pasted to G_AUDOUT
    by mistake.
    Signed-off-by: NTrent Piepho <xyzzy@speakeasy.org>
    Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
    337f9d20
v4l2-ioctl.c 51.1 KB