From: Markus Rechberger Date: Wed, 9 Nov 2005 05:37:53 +0000 (-0800) Subject: [PATCH] v4l: 814: cleanup dev assignment X-Git-Tag: v2.6.15-rc1~202 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=86bb4a215d152111f20daeb2a530f064afee8542;p=linux-2.6-omap-h63xx.git [PATCH] v4l: 814: cleanup dev assignment - Cleanup dev assignment Signed-off-by: Markus Rechberger Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index daa4387a229..16a6d2da739 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c @@ -357,20 +357,10 @@ static void em2820_release_resources(struct em2820 *dev) * em2820_v4l2_close() * stops streaming and deallocates all resources allocated by the v4l2 calls and ioctls */ -static int em2820_v4l2_close(struct inode *inode, struct file *file) +static int em2820_v4l2_close(struct inode *inode, struct file *filp) { int errCode; - int minor = iminor(inode); - struct em2820 *h,*dev = NULL; - struct list_head *list; - - list_for_each(list,&em2820_devlist) { - h = list_entry(list, struct em2820, devlist); - if (h->vdev->minor == minor) { - dev = h; - } - } - + struct em2820 *dev=filp->private_data; em2820_videodbg("users=%d", dev->users);