summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-08-24 12:54:29 +0200
committerJean-Francois Moine <moinejf@free.fr>2008-08-24 12:54:29 +0200
commit4cd2b234d40150679d2b38345e0c38281f882532 (patch)
treeb9d9962c8947f3338c8e9648a29cacbac31f0a9e /linux/drivers/media/video/gspca
parentffdca26f9f20d842bcfbffedb07f062534cfd6eb (diff)
downloadmediapointer-dvb-s2-4cd2b234d40150679d2b38345e0c38281f882532.tar.gz
mediapointer-dvb-s2-4cd2b234d40150679d2b38345e0c38281f882532.tar.bz2
gspca: Reinitialize the device on resume.
From: Jean-Francois Moine <moinejf@free.fr> Priority: high Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca')
-rw-r--r--linux/drivers/media/video/gspca/gspca.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/linux/drivers/media/video/gspca/gspca.c b/linux/drivers/media/video/gspca/gspca.c
index 716a01446..4e8eab52f 100644
--- a/linux/drivers/media/video/gspca/gspca.c
+++ b/linux/drivers/media/video/gspca/gspca.c
@@ -1845,9 +1845,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