aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-09-03 17:12:15 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-03 18:37:32 -0300
commit1e89e2da48070da8ac221c37fea8fa82da127c34 (patch)
tree26f748e74c1bccb4d36dd0d880cd926b5f03cb44
parent65f33396ab57f3346fb07ddee8e3aa616d13386c (diff)
V4L/DVB (8818): gspca: Reinitialize the device on resume.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/gspca.c9
1 files changed, 6 insertions, 3 deletions
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