redhat-2.4.18-kernel-videodev.patch
来自「cpia usb摄像头的驱动程序源码。需要video4linux和i2c-cor」· PATCH 代码 · 共 30 行
PATCH
30 行
diff -uNr linux-2.4.20/drivers/media/video/videodev.c linux-2.4.20-videodev_fix/drivers/media/video/videodev.c--- linux-2.4.20/drivers/media/video/videodev.c Sun Sep 29 19:31:52 2002+++ linux-2.4.20-videodev_fix/drivers/media/video/videodev.c Wed Jan 8 03:11:25 2003@@ -186,14 +186,20 @@ static int video_release(struct inode *inode, struct file *file) { struct video_device *vfl;+ struct module *owner; - down(&videodev_lock); vfl = video_devdata(file);- if(vfl->close)+ owner = vfl->owner;+ if(vfl->close) vfl->close(vfl);- vfl->users--;- if(vfl->owner)- __MOD_DEC_USE_COUNT(vfl->owner);++ down(&videodev_lock);+ /* ->close() might have called video_device_unregister()+ in case of a hot unplug, thus we have to get vfl again */+ if (vfl = video_devdata(file)) + vfl->users--;+ if (owner) + __MOD_DEC_USE_COUNT(owner); up(&videodev_lock); return 0; }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?