diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-09-03 22:12:15 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-09-03 23:37:32 +0200 |
commit | 1e89e2da48070da8ac221c37fea8fa82da127c34 (patch) | |
tree | 26f748e74c1bccb4d36dd0d880cd926b5f03cb44 /drivers | |
parent | V4L/DVB (8817): gspca: LED and proble changes in sonixb. (diff) | |
download | linux-1e89e2da48070da8ac221c37fea8fa82da127c34.tar.xz linux-1e89e2da48070da8ac221c37fea8fa82da127c34.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/gspca/gspca.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index e7e73ec7134c..1767991c1f4b 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 |