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: upstream/snapshot3+hdmi~22748^2~4^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e89e2da48070da8ac221c37fea8fa82da127c34;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.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 e7e73ec..1767991 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