aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/vicam.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/vicam.c')
-rw-r--r--drivers/media/video/gspca/vicam.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/media/video/gspca/vicam.c b/drivers/media/video/gspca/vicam.c
index 911152e169d6..15a30f7a4b2a 100644
--- a/drivers/media/video/gspca/vicam.c
+++ b/drivers/media/video/gspca/vicam.c
@@ -37,9 +37,12 @@
37#include <linux/ihex.h> 37#include <linux/ihex.h>
38#include "gspca.h" 38#include "gspca.h"
39 39
40#define VICAM_FIRMWARE "vicam/firmware.fw"
41
40MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>"); 42MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
41MODULE_DESCRIPTION("GSPCA ViCam USB Camera Driver"); 43MODULE_DESCRIPTION("GSPCA ViCam USB Camera Driver");
42MODULE_LICENSE("GPL"); 44MODULE_LICENSE("GPL");
45MODULE_FIRMWARE(VICAM_FIRMWARE);
43 46
44enum e_ctrl { 47enum e_ctrl {
45 GAIN, 48 GAIN,
@@ -222,7 +225,11 @@ static void vicam_dostream(struct work_struct *work)
222 goto exit; 225 goto exit;
223 } 226 }
224 227
225 while (gspca_dev->present && gspca_dev->streaming) { 228 while (gspca_dev->dev && gspca_dev->streaming) {
229#ifdef CONFIG_PM
230 if (gspca_dev->frozen)
231 break;
232#endif
226 ret = vicam_read_frame(gspca_dev, buffer, frame_sz); 233 ret = vicam_read_frame(gspca_dev, buffer, frame_sz);
227 if (ret < 0) 234 if (ret < 0)
228 break; 235 break;
@@ -268,7 +275,7 @@ static int sd_init(struct gspca_dev *gspca_dev)
268 const struct firmware *uninitialized_var(fw); 275 const struct firmware *uninitialized_var(fw);
269 u8 *firmware_buf; 276 u8 *firmware_buf;
270 277
271 ret = request_ihex_firmware(&fw, "vicam/firmware.fw", 278 ret = request_ihex_firmware(&fw, VICAM_FIRMWARE,
272 &gspca_dev->dev->dev); 279 &gspca_dev->dev->dev);
273 if (ret) { 280 if (ret) {
274 pr_err("Failed to load \"vicam/firmware.fw\": %d\n", ret); 281 pr_err("Failed to load \"vicam/firmware.fw\": %d\n", ret);
@@ -324,7 +331,7 @@ static void sd_stop0(struct gspca_dev *gspca_dev)
324 dev->work_thread = NULL; 331 dev->work_thread = NULL;
325 mutex_lock(&gspca_dev->usb_lock); 332 mutex_lock(&gspca_dev->usb_lock);
326 333
327 if (gspca_dev->present) 334 if (gspca_dev->dev)
328 vicam_set_camera_power(gspca_dev, 0); 335 vicam_set_camera_power(gspca_dev, 0);
329} 336}
330 337