diff options
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-driver.c | 33 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-audio.c | 5 | ||||
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_s5k4aa.c | 20 | ||||
-rw-r--r-- | drivers/media/video/gspca/mr97310a.c | 2 | ||||
-rw-r--r-- | drivers/media/video/gspca/ov519.c | 2 | ||||
-rw-r--r-- | drivers/media/video/gspca/stv06xx/stv06xx.c | 3 | ||||
-rw-r--r-- | drivers/media/video/pxa_camera.c | 5 | ||||
-rw-r--r-- | drivers/media/video/s2255drv.c | 5 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 1 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-ts.c | 6 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 1 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164-cmd.c | 2 | ||||
-rw-r--r-- | drivers/media/video/sh_mobile_ceu_camera.c | 4 | ||||
-rw-r--r-- | drivers/media/video/soc_camera.c | 16 | ||||
-rw-r--r-- | drivers/media/video/uvc/uvc_ctrl.c | 2 | ||||
-rw-r--r-- | drivers/media/video/uvc/uvc_video.c | 3 |
16 files changed, 82 insertions, 28 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 939d1e512974..a6724019c66f 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -1299,7 +1299,7 @@ set_tvnorm(struct bttv *btv, unsigned int norm) | |||
1299 | 1299 | ||
1300 | tvnorm = &bttv_tvnorms[norm]; | 1300 | tvnorm = &bttv_tvnorms[norm]; |
1301 | 1301 | ||
1302 | if (!memcmp(&bttv_tvnorms[btv->tvnorm].cropcap, &tvnorm->cropcap, | 1302 | if (memcmp(&bttv_tvnorms[btv->tvnorm].cropcap, &tvnorm->cropcap, |
1303 | sizeof (tvnorm->cropcap))) { | 1303 | sizeof (tvnorm->cropcap))) { |
1304 | bttv_crop_reset(&btv->crop[0], norm); | 1304 | bttv_crop_reset(&btv->crop[0], norm); |
1305 | btv->crop[1] = btv->crop[0]; /* current = default */ | 1305 | btv->crop[1] = btv->crop[0]; /* current = default */ |
@@ -3800,11 +3800,34 @@ bttv_irq_next_video(struct bttv *btv, struct bttv_buffer_set *set) | |||
3800 | if (!V4L2_FIELD_HAS_BOTH(item->vb.field) && | 3800 | if (!V4L2_FIELD_HAS_BOTH(item->vb.field) && |
3801 | (item->vb.queue.next != &btv->capture)) { | 3801 | (item->vb.queue.next != &btv->capture)) { |
3802 | item = list_entry(item->vb.queue.next, struct bttv_buffer, vb.queue); | 3802 | item = list_entry(item->vb.queue.next, struct bttv_buffer, vb.queue); |
3803 | /* Mike Isely <isely@pobox.com> - Only check | ||
3804 | * and set up the bottom field in the logic | ||
3805 | * below. Don't ever do the top field. This | ||
3806 | * of course means that if we set up the | ||
3807 | * bottom field in the above code that we'll | ||
3808 | * actually skip a field. But that's OK. | ||
3809 | * Having processed only a single buffer this | ||
3810 | * time, then the next time around the first | ||
3811 | * available buffer should be for a top field. | ||
3812 | * That will then cause us here to set up a | ||
3813 | * top then a bottom field in the normal way. | ||
3814 | * The alternative to this understanding is | ||
3815 | * that we set up the second available buffer | ||
3816 | * as a top field, but that's out of order | ||
3817 | * since this driver always processes the top | ||
3818 | * field first - the effect will be the two | ||
3819 | * buffers being returned in the wrong order, | ||
3820 | * with the second buffer also being delayed | ||
3821 | * by one field time (owing to the fifo nature | ||
3822 | * of videobuf). Worse still, we'll be stuck | ||
3823 | * doing fields out of order now every time | ||
3824 | * until something else causes a field to be | ||
3825 | * dropped. By effectively forcing a field to | ||
3826 | * drop this way then we always get back into | ||
3827 | * sync within a single frame time. (Out of | ||
3828 | * order fields can screw up deinterlacing | ||
3829 | * algorithms.) */ | ||
3803 | if (!V4L2_FIELD_HAS_BOTH(item->vb.field)) { | 3830 | if (!V4L2_FIELD_HAS_BOTH(item->vb.field)) { |
3804 | if (NULL == set->top && | ||
3805 | V4L2_FIELD_TOP == item->vb.field) { | ||
3806 | set->top = item; | ||
3807 | } | ||
3808 | if (NULL == set->bottom && | 3831 | if (NULL == set->bottom && |
3809 | V4L2_FIELD_BOTTOM == item->vb.field) { | 3832 | V4L2_FIELD_BOTTOM == item->vb.field) { |
3810 | set->bottom = item; | 3833 | set->bottom = item; |
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c index 7bd8a70f0a0b..ac947aecb9c3 100644 --- a/drivers/media/video/em28xx/em28xx-audio.c +++ b/drivers/media/video/em28xx/em28xx-audio.c | |||
@@ -383,6 +383,11 @@ static int snd_em28xx_hw_capture_free(struct snd_pcm_substream *substream) | |||
383 | 383 | ||
384 | static int snd_em28xx_prepare(struct snd_pcm_substream *substream) | 384 | static int snd_em28xx_prepare(struct snd_pcm_substream *substream) |
385 | { | 385 | { |
386 | struct em28xx *dev = snd_pcm_substream_chip(substream); | ||
387 | |||
388 | dev->adev.hwptr_done_capture = 0; | ||
389 | dev->adev.capture_transfer_done = 0; | ||
390 | |||
386 | return 0; | 391 | return 0; |
387 | } | 392 | } |
388 | 393 | ||
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c index 59400e858965..a27afeb6f39b 100644 --- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c +++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c | |||
@@ -35,12 +35,25 @@ static | |||
35 | const | 35 | const |
36 | struct dmi_system_id s5k4aa_vflip_dmi_table[] = { | 36 | struct dmi_system_id s5k4aa_vflip_dmi_table[] = { |
37 | { | 37 | { |
38 | .ident = "BRUNEINIT", | ||
39 | .matches = { | ||
40 | DMI_MATCH(DMI_SYS_VENDOR, "BRUNENIT"), | ||
41 | DMI_MATCH(DMI_PRODUCT_NAME, "BRUNENIT"), | ||
42 | DMI_MATCH(DMI_BOARD_VERSION, "00030D0000000001") | ||
43 | } | ||
44 | }, { | ||
38 | .ident = "Fujitsu-Siemens Amilo Xa 2528", | 45 | .ident = "Fujitsu-Siemens Amilo Xa 2528", |
39 | .matches = { | 46 | .matches = { |
40 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | 47 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), |
41 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xa 2528") | 48 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xa 2528") |
42 | } | 49 | } |
43 | }, { | 50 | }, { |
51 | .ident = "Fujitsu-Siemens Amilo Xi 2528", | ||
52 | .matches = { | ||
53 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | ||
54 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xi 2528") | ||
55 | } | ||
56 | }, { | ||
44 | .ident = "Fujitsu-Siemens Amilo Xi 2550", | 57 | .ident = "Fujitsu-Siemens Amilo Xi 2550", |
45 | .matches = { | 58 | .matches = { |
46 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | 59 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), |
@@ -57,6 +70,13 @@ static | |||
57 | .matches = { | 70 | .matches = { |
58 | DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"), | 71 | DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"), |
59 | DMI_MATCH(DMI_PRODUCT_NAME, "GX700"), | 72 | DMI_MATCH(DMI_PRODUCT_NAME, "GX700"), |
73 | DMI_MATCH(DMI_BIOS_DATE, "12/02/2008") | ||
74 | } | ||
75 | }, { | ||
76 | .ident = "MSI GX700", | ||
77 | .matches = { | ||
78 | DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"), | ||
79 | DMI_MATCH(DMI_PRODUCT_NAME, "GX700"), | ||
60 | DMI_MATCH(DMI_BIOS_DATE, "07/26/2007") | 80 | DMI_MATCH(DMI_BIOS_DATE, "07/26/2007") |
61 | } | 81 | } |
62 | }, { | 82 | }, { |
diff --git a/drivers/media/video/gspca/mr97310a.c b/drivers/media/video/gspca/mr97310a.c index 140c8f320e47..f8328b9efae5 100644 --- a/drivers/media/video/gspca/mr97310a.c +++ b/drivers/media/video/gspca/mr97310a.c | |||
@@ -483,7 +483,7 @@ static int start_cif_cam(struct gspca_dev *gspca_dev) | |||
483 | data[3] = 0x2c; /* reg 2, H size/8 */ | 483 | data[3] = 0x2c; /* reg 2, H size/8 */ |
484 | data[4] = 0x48; /* reg 3, V size/4 */ | 484 | data[4] = 0x48; /* reg 3, V size/4 */ |
485 | data[6] = 0x06; /* reg 5, H start */ | 485 | data[6] = 0x06; /* reg 5, H start */ |
486 | data[8] = 0x06 + sd->sensor_type; /* reg 7, V start */ | 486 | data[8] = 0x06 - sd->sensor_type; /* reg 7, V start */ |
487 | break; | 487 | break; |
488 | } | 488 | } |
489 | err_code = mr_write(gspca_dev, 11); | 489 | err_code = mr_write(gspca_dev, 11); |
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index 2f6e135d94bc..a5c190e93799 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c | |||
@@ -2919,7 +2919,7 @@ static void ov518_pkt_scan(struct gspca_dev *gspca_dev, | |||
2919 | /* A false positive here is likely, until OVT gives me | 2919 | /* A false positive here is likely, until OVT gives me |
2920 | * the definitive SOF/EOF format */ | 2920 | * the definitive SOF/EOF format */ |
2921 | if ((!(data[0] | data[1] | data[2] | data[3] | data[5])) && data[6]) { | 2921 | if ((!(data[0] | data[1] | data[2] | data[3] | data[5])) && data[6]) { |
2922 | gspca_frame_add(gspca_dev, LAST_PACKET, frame, data, 0); | 2922 | frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame, data, 0); |
2923 | gspca_frame_add(gspca_dev, FIRST_PACKET, frame, data, 0); | 2923 | gspca_frame_add(gspca_dev, FIRST_PACKET, frame, data, 0); |
2924 | sd->packet_nr = 0; | 2924 | sd->packet_nr = 0; |
2925 | } | 2925 | } |
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.c b/drivers/media/video/gspca/stv06xx/stv06xx.c index 65489d6b0d89..bfae63f5584c 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx.c | |||
@@ -394,7 +394,8 @@ frame_data: | |||
394 | PDEBUG(D_PACK, "End of frame detected"); | 394 | PDEBUG(D_PACK, "End of frame detected"); |
395 | 395 | ||
396 | /* Complete the last frame (if any) */ | 396 | /* Complete the last frame (if any) */ |
397 | gspca_frame_add(gspca_dev, LAST_PACKET, frame, data, 0); | 397 | frame = gspca_frame_add(gspca_dev, LAST_PACKET, |
398 | frame, data, 0); | ||
398 | 399 | ||
399 | if (chunk_len) | 400 | if (chunk_len) |
400 | PDEBUG(D_ERR, "Chunk length is " | 401 | PDEBUG(D_ERR, "Chunk length is " |
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index 6952e9602d5d..51b683c63b70 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/device.h> | 26 | #include <linux/device.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/sched.h> | ||
29 | 30 | ||
30 | #include <media/v4l2-common.h> | 31 | #include <media/v4l2-common.h> |
31 | #include <media/v4l2-dev.h> | 32 | #include <media/v4l2-dev.h> |
@@ -1432,7 +1433,9 @@ static int pxa_camera_set_fmt(struct soc_camera_device *icd, | |||
1432 | icd->sense = &sense; | 1433 | icd->sense = &sense; |
1433 | 1434 | ||
1434 | cam_f.fmt.pix.pixelformat = cam_fmt->fourcc; | 1435 | cam_f.fmt.pix.pixelformat = cam_fmt->fourcc; |
1435 | ret = v4l2_subdev_call(sd, video, s_fmt, f); | 1436 | ret = v4l2_subdev_call(sd, video, s_fmt, &cam_f); |
1437 | cam_f.fmt.pix.pixelformat = pix->pixelformat; | ||
1438 | *pix = cam_f.fmt.pix; | ||
1436 | 1439 | ||
1437 | icd->sense = NULL; | 1440 | icd->sense = NULL; |
1438 | 1441 | ||
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c index 9e3262c0ba37..2c0bb06cab3b 100644 --- a/drivers/media/video/s2255drv.c +++ b/drivers/media/video/s2255drv.c | |||
@@ -598,11 +598,6 @@ static int s2255_got_frame(struct s2255_dev *dev, int chn, int jpgsize) | |||
598 | buf = list_entry(dma_q->active.next, | 598 | buf = list_entry(dma_q->active.next, |
599 | struct s2255_buffer, vb.queue); | 599 | struct s2255_buffer, vb.queue); |
600 | 600 | ||
601 | if (!waitqueue_active(&buf->vb.done)) { | ||
602 | /* no one active */ | ||
603 | rc = -1; | ||
604 | goto unlock; | ||
605 | } | ||
606 | list_del(&buf->vb.queue); | 601 | list_del(&buf->vb.queue); |
607 | do_gettimeofday(&buf->vb.ts); | 602 | do_gettimeofday(&buf->vb.ts); |
608 | dprintk(100, "[%p/%d] wakeup\n", buf, buf->vb.i); | 603 | dprintk(100, "[%p/%d] wakeup\n", buf, buf->vb.i); |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 71145bff94fa..09013229d4aa 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -3428,6 +3428,7 @@ struct saa7134_board saa7134_boards[] = { | |||
3428 | .tuner_config = 3, | 3428 | .tuner_config = 3, |
3429 | .mpeg = SAA7134_MPEG_DVB, | 3429 | .mpeg = SAA7134_MPEG_DVB, |
3430 | .ts_type = SAA7134_MPEG_TS_SERIAL, | 3430 | .ts_type = SAA7134_MPEG_TS_SERIAL, |
3431 | .ts_force_val = 1, | ||
3431 | .gpiomask = 0x0800100, /* GPIO 21 is an INPUT */ | 3432 | .gpiomask = 0x0800100, /* GPIO 21 is an INPUT */ |
3432 | .inputs = {{ | 3433 | .inputs = {{ |
3433 | .name = name_tv, | 3434 | .name = name_tv, |
diff --git a/drivers/media/video/saa7134/saa7134-ts.c b/drivers/media/video/saa7134/saa7134-ts.c index 3fa652279ac0..03488ba4c99c 100644 --- a/drivers/media/video/saa7134/saa7134-ts.c +++ b/drivers/media/video/saa7134/saa7134-ts.c | |||
@@ -262,11 +262,13 @@ int saa7134_ts_start(struct saa7134_dev *dev) | |||
262 | switch (saa7134_boards[dev->board].ts_type) { | 262 | switch (saa7134_boards[dev->board].ts_type) { |
263 | case SAA7134_MPEG_TS_PARALLEL: | 263 | case SAA7134_MPEG_TS_PARALLEL: |
264 | saa_writeb(SAA7134_TS_SERIAL0, 0x40); | 264 | saa_writeb(SAA7134_TS_SERIAL0, 0x40); |
265 | saa_writeb(SAA7134_TS_PARALLEL, 0xec); | 265 | saa_writeb(SAA7134_TS_PARALLEL, 0xec | |
266 | (saa7134_boards[dev->board].ts_force_val << 4)); | ||
266 | break; | 267 | break; |
267 | case SAA7134_MPEG_TS_SERIAL: | 268 | case SAA7134_MPEG_TS_SERIAL: |
268 | saa_writeb(SAA7134_TS_SERIAL0, 0xd8); | 269 | saa_writeb(SAA7134_TS_SERIAL0, 0xd8); |
269 | saa_writeb(SAA7134_TS_PARALLEL, 0x6c); | 270 | saa_writeb(SAA7134_TS_PARALLEL, 0x6c | |
271 | (saa7134_boards[dev->board].ts_force_val << 4)); | ||
270 | saa_writeb(SAA7134_TS_PARALLEL_SERIAL, 0xbc); | 272 | saa_writeb(SAA7134_TS_PARALLEL_SERIAL, 0xbc); |
271 | saa_writeb(SAA7134_TS_SERIAL1, 0x02); | 273 | saa_writeb(SAA7134_TS_SERIAL1, 0x02); |
272 | break; | 274 | break; |
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index 6ee3e9b7769e..f8697d46ff5f 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h | |||
@@ -360,6 +360,7 @@ struct saa7134_board { | |||
360 | enum saa7134_mpeg_type mpeg; | 360 | enum saa7134_mpeg_type mpeg; |
361 | enum saa7134_mpeg_ts_type ts_type; | 361 | enum saa7134_mpeg_ts_type ts_type; |
362 | unsigned int vid_port_opts; | 362 | unsigned int vid_port_opts; |
363 | unsigned int ts_force_val:1; | ||
363 | }; | 364 | }; |
364 | 365 | ||
365 | #define card_has_radio(dev) (NULL != saa7134_boards[dev->board].radio.name) | 366 | #define card_has_radio(dev) (NULL != saa7134_boards[dev->board].radio.name) |
diff --git a/drivers/media/video/saa7164/saa7164-cmd.c b/drivers/media/video/saa7164/saa7164-cmd.c index c45966edc0cf..9c1d3ac43869 100644 --- a/drivers/media/video/saa7164/saa7164-cmd.c +++ b/drivers/media/video/saa7164/saa7164-cmd.c | |||
@@ -347,7 +347,7 @@ int saa7164_cmd_send(struct saa7164_dev *dev, u8 id, tmComResCmd_t command, | |||
347 | 347 | ||
348 | /* Prepare some basic command/response structures */ | 348 | /* Prepare some basic command/response structures */ |
349 | memset(&command_t, 0, sizeof(command_t)); | 349 | memset(&command_t, 0, sizeof(command_t)); |
350 | memset(&response_t, 0, sizeof(&response_t)); | 350 | memset(&response_t, 0, sizeof(response_t)); |
351 | pcommand_t = &command_t; | 351 | pcommand_t = &command_t; |
352 | presponse_t = &response_t; | 352 | presponse_t = &response_t; |
353 | command_t.id = id; | 353 | command_t.id = id; |
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 65ac474c517a..2f78b4f263f5 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c | |||
@@ -1173,8 +1173,8 @@ static int get_scales(struct soc_camera_device *icd, | |||
1173 | width_in = scale_up(cam->ceu_rect.width, *scale_h); | 1173 | width_in = scale_up(cam->ceu_rect.width, *scale_h); |
1174 | height_in = scale_up(cam->ceu_rect.height, *scale_v); | 1174 | height_in = scale_up(cam->ceu_rect.height, *scale_v); |
1175 | 1175 | ||
1176 | *scale_h = calc_generic_scale(cam->ceu_rect.width, icd->user_width); | 1176 | *scale_h = calc_generic_scale(width_in, icd->user_width); |
1177 | *scale_v = calc_generic_scale(cam->ceu_rect.height, icd->user_height); | 1177 | *scale_v = calc_generic_scale(height_in, icd->user_height); |
1178 | 1178 | ||
1179 | return 0; | 1179 | return 0; |
1180 | } | 1180 | } |
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index 59aa7a3694c2..36e617bd13c7 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c | |||
@@ -1160,13 +1160,15 @@ void soc_camera_host_unregister(struct soc_camera_host *ici) | |||
1160 | if (icd->iface == ici->nr) { | 1160 | if (icd->iface == ici->nr) { |
1161 | /* The bus->remove will be called */ | 1161 | /* The bus->remove will be called */ |
1162 | device_unregister(&icd->dev); | 1162 | device_unregister(&icd->dev); |
1163 | /* Not before device_unregister(), .remove | 1163 | /* |
1164 | * needs parent to call ici->ops->remove() */ | 1164 | * Not before device_unregister(), .remove |
1165 | icd->dev.parent = NULL; | 1165 | * needs parent to call ici->ops->remove(). |
1166 | 1166 | * If the host module is loaded again, device_register() | |
1167 | /* If the host module is loaded again, device_register() | 1167 | * would complain "already initialised," since 2.6.32 |
1168 | * would complain "already initialised" */ | 1168 | * this is also needed to prevent use-after-free of the |
1169 | memset(&icd->dev.kobj, 0, sizeof(icd->dev.kobj)); | 1169 | * device private data. |
1170 | */ | ||
1171 | memset(&icd->dev, 0, sizeof(icd->dev)); | ||
1170 | } | 1172 | } |
1171 | } | 1173 | } |
1172 | 1174 | ||
diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c index c3225a561748..1b89735e62fd 100644 --- a/drivers/media/video/uvc/uvc_ctrl.c +++ b/drivers/media/video/uvc/uvc_ctrl.c | |||
@@ -348,7 +348,7 @@ static void uvc_ctrl_set_zoom(struct uvc_control_mapping *mapping, | |||
348 | __s32 value, __u8 *data) | 348 | __s32 value, __u8 *data) |
349 | { | 349 | { |
350 | data[0] = value == 0 ? 0 : (value > 0) ? 1 : 0xff; | 350 | data[0] = value == 0 ? 0 : (value > 0) ? 1 : 0xff; |
351 | data[2] = min(abs(value), 0xff); | 351 | data[2] = min((int)abs(value), 0xff); |
352 | } | 352 | } |
353 | 353 | ||
354 | static struct uvc_control_mapping uvc_ctrl_mappings[] = { | 354 | static struct uvc_control_mapping uvc_ctrl_mappings[] = { |
diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c index f960e8ea4f17..a6e41d12b221 100644 --- a/drivers/media/video/uvc/uvc_video.c +++ b/drivers/media/video/uvc/uvc_video.c | |||
@@ -90,7 +90,8 @@ static void uvc_fixup_video_ctrl(struct uvc_streaming *stream, | |||
90 | ctrl->dwMaxVideoFrameSize = | 90 | ctrl->dwMaxVideoFrameSize = |
91 | frame->dwMaxVideoFrameBufferSize; | 91 | frame->dwMaxVideoFrameBufferSize; |
92 | 92 | ||
93 | if (stream->dev->quirks & UVC_QUIRK_FIX_BANDWIDTH && | 93 | if (!(format->flags & UVC_FMT_FLAG_COMPRESSED) && |
94 | stream->dev->quirks & UVC_QUIRK_FIX_BANDWIDTH && | ||
94 | stream->intf->num_altsetting > 1) { | 95 | stream->intf->num_altsetting > 1) { |
95 | u32 interval; | 96 | u32 interval; |
96 | u32 bandwidth; | 97 | u32 bandwidth; |