diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-11-18 13:52:31 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-24 09:01:23 -0500 |
commit | 5c4fa002b1c7b40f65fa911ae17a823ec9e26ab2 (patch) | |
tree | de334f5d2dcdb93fff14584957ed820f9fe57208 /drivers/media/video/gspca/gspca.h | |
parent | 98522a7be97f2b23451342e36c39f412f0461e24 (diff) |
V4L/DVB (9690): gspca: Lock the subdrivers via module_get/put.
The previous subdriver protection against rmmod was done via the
file operations table in the device descriptor. On device disconnection
while streaming, the device structure was freed at close time, and the
module_put still used the module name in the freed area.
Now, explicit module get/put are done on open and close.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/gspca.h')
-rw-r--r-- | drivers/media/video/gspca/gspca.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h index c35d7b97112f..2ae1ad7c1483 100644 --- a/drivers/media/video/gspca/gspca.h +++ b/drivers/media/video/gspca/gspca.h | |||
@@ -121,7 +121,7 @@ struct gspca_frame { | |||
121 | 121 | ||
122 | struct gspca_dev { | 122 | struct gspca_dev { |
123 | struct video_device vdev; /* !! must be the first item */ | 123 | struct video_device vdev; /* !! must be the first item */ |
124 | struct file_operations fops; | 124 | struct module *module; /* subdriver handling the device */ |
125 | struct usb_device *dev; | 125 | struct usb_device *dev; |
126 | struct kref kref; | 126 | struct kref kref; |
127 | struct file *capt_file; /* file doing video capture */ | 127 | struct file *capt_file; /* file doing video capture */ |