• Jacopo Mondi's avatar
    media: v4l2-subdev: Guard whole fops and ioctl hdlr · fb15db8c
    Jacopo Mondi authored
    A sub-device device node can be registered in user space only if the
    CONFIG_VIDEO_V4L2_SUBDEV_API Kconfig option is selected. Currently the
    open/close file operations and the ioctl handler have some parts of
    their implementations guarded by #if
    defined(CONFIG_VIDEO_V4L2_SUBDEV_API), while they are actually not
    accessible without a video device node registered to user space.
    
    Guard the whole open, close and ioctl handler and provide stubs if the
    VIDEO_V4L2_SUBDEV_API Kconfig option is not selected.
    
    This slightly reduces the kernel size when the option is not selected
    and simplifies the file ops and ioctl implementations.
    Signed-off-by: default avatarJacopo Mondi <jacopo@jmondi.org>
    Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
    fb15db8c
v4l2-subdev.c 21.3 KB