参考韦东山老师视频:
vivi_init
vivi_create_instance(i);
{
struct vivi_dev *dev;
struct video_device *vfd;
struct v4l2_ctrl_handler *hdl;
// 不是主要, 只是用于初始化一些东西,比如自旋锁、引用计数
v4l2_device_register(NULL, &dev->v4l2_dev);
vfd = video_device_alloc();
*vfd = vivi_template; //设置
1. vfd:
.fops = &vivi_fops,
.ioctl_ops