From: Jean-Francois Moine Date: Wed, 3 Sep 2008 20:12:15 +0000 (-0300) Subject: V4L/DVB (8818): gspca: Reinitialize the device on resume. X-Git-Tag: v2.6.27-rc6~37^2~4^2~28 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1e89e2da48070da8ac221c37fea8fa82da127c34;p=linux-2.6-omap-h63xx.git V4L/DVB (8818): gspca: Reinitialize the device on resume. Signed-off-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index e7e73ec7134..1767991c1f4 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -1838,9 +1838,12 @@ int gspca_resume(struct usb_interface *intf) struct gspca_dev *gspca_dev = usb_get_intfdata(intf); gspca_dev->frozen = 0; - if (!gspca_dev->streaming) - return 0; - return gspca_init_transfer(gspca_dev); + if (gspca_dev->users != 0) { + gspca_dev->sd_desc->open(gspca_dev); + if (gspca_dev->streaming) + return gspca_init_transfer(gspca_dev); + } + return 0; } EXPORT_SYMBOL(gspca_resume); #endif