]> git.baikalelectronics.ru Git - kernel.git/commit
V4L/DVB: hdpvr: fix disconnect sequence
authorHans Verkuil <hverkuil@xs4all.nl>
Sun, 2 May 2010 11:01:04 +0000 (08:01 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 19 May 2010 15:58:57 +0000 (12:58 -0300)
commiteb95cdcccf8907145f72ebf408bbf932b93336f9
treefd70d24d94642f029024afd755e900b9264ff3b0
parentc1ed7760060b147a46321288fe3d3b155774c43a
V4L/DVB: hdpvr: fix disconnect sequence

Disconnecting the HDPVR caused a kernel oops if lockdep was enabled.
In addition, if an app still had video0 open and attempted to call ioctl
when the device was already disconnected the system would crash.

Move the freeing and cleanup code to the release function: that is the
right place for it since you know when you get there that nobody is
using the device.

Also removed usb_set_intfdata: v4l2_device_register sets this already
to v4l2_dev.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/hdpvr/hdpvr-core.c
drivers/media/video/hdpvr/hdpvr-video.c
drivers/media/video/hdpvr/hdpvr.h