Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (23 commits)
V4L/DVB (13966): DVB-T regression fix for saa7134 cards
V4L/DVB (13955): cx25821: fix double unlock in medusa_video_init()
MAINTAINERS: ivtv-devel is moderated
MAINTAINERS: Andy Walls is the new ivtv maintainer
V4L/DVB (13941): rj54n1cb0c: remove compiler warning
V4L/DVB sh_mobile_ceu: don't check platform_get_irq's return value against zero
V4L/DVB mx1_camera: don't check platform_get_irq's return value against zero
V4L/DVB (13934): tda8290: Fix FM radio easy programming standard selection for TDA8295
V4L/DVB (13900): gspca - sunplus: Fix bridge exchanges.
V4L/DVB (13887): tda8290: add autodetection support for TDA8295c2
V4L/DVB (13882): gspca - stv06xx-vv6410: Ensure register STV_SCAN_RATE is zero
V4L/DVB (13880): gspca - m5602-s5k4aa: Add vflip quirk for the Amilo Xi 2428
V4L/DVB (13875): gspca - vc032x: Fix a possible crash with the vc0321 bridge.
V4L/DVB (13868): gspca - sn9c20x: Fix test of unsigned.
V4L/DVB (13858): ir-keytable: use the right header
feature-removal-schedule: Add v4l1 drivers obsoleted by gspca sub drivers
V4L/DVB (13622): gspca - ov534: Fix a compilation warning.
V4L/DVB (13834): dib8000: fix compilation if !DVB_DIB8000
V4L/DVB (13831): uvcvideo: Fix oops caused by a race condition in buffer dequeuing
V4L/DVB (13829): uvcvideo: Fix alternate setting selection in isochronous mode
...

+151 -71
+49
Documentation/feature-removal-schedule.txt
··· 493 Who: Corentin Chary <corentin.chary@gmail.com> 494 495 ----------------------------
··· 493 Who: Corentin Chary <corentin.chary@gmail.com> 494 495 ---------------------------- 496 + 497 + What: usbvideo quickcam_messenger driver 498 + When: 2.6.35 499 + Files: drivers/media/video/usbvideo/quickcam_messenger.[ch] 500 + Why: obsolete v4l1 driver replaced by gspca_stv06xx 501 + Who: Hans de Goede <hdegoede@redhat.com> 502 + 503 + ---------------------------- 504 + 505 + What: ov511 v4l1 driver 506 + When: 2.6.35 507 + Files: drivers/media/video/ov511.[ch] 508 + Why: obsolete v4l1 driver replaced by gspca_ov519 509 + Who: Hans de Goede <hdegoede@redhat.com> 510 + 511 + ---------------------------- 512 + 513 + What: w9968cf v4l1 driver 514 + When: 2.6.35 515 + Files: drivers/media/video/w9968cf*.[ch] 516 + Why: obsolete v4l1 driver replaced by gspca_ov519 517 + Who: Hans de Goede <hdegoede@redhat.com> 518 + 519 + ---------------------------- 520 + 521 + What: ovcamchip sensor framework 522 + When: 2.6.35 523 + Files: drivers/media/video/ovcamchip/* 524 + Why: Only used by obsoleted v4l1 drivers 525 + Who: Hans de Goede <hdegoede@redhat.com> 526 + 527 + ---------------------------- 528 + 529 + What: stv680 v4l1 driver 530 + When: 2.6.35 531 + Files: drivers/media/video/stv680.[ch] 532 + Why: obsolete v4l1 driver replaced by gspca_stv0680 533 + Who: Hans de Goede <hdegoede@redhat.com> 534 + 535 + ---------------------------- 536 + 537 + What: zc0301 v4l driver 538 + When: 2.6.35 539 + Files: drivers/media/video/zc0301/* 540 + Why: Duplicate functionality with the gspca_zc3xx driver, zc0301 only 541 + supports 2 USB-ID's (because it only supports a limited set of 542 + sensors) wich are also supported by the gspca_zc3xx driver 543 + (which supports 53 USB-ID's in total) 544 + Who: Hans de Goede <hdegoede@redhat.com>
+3 -4
MAINTAINERS
··· 1637 F: sound/pci/cs5535audio/ 1638 1639 CX18 VIDEO4LINUX DRIVER 1640 - M: Hans Verkuil <hverkuil@xs4all.nl> 1641 M: Andy Walls <awalls@radix.net> 1642 - L: ivtv-devel@ivtvdriver.org 1643 L: linux-media@vger.kernel.org 1644 T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 1645 W: http://linuxtv.org ··· 3010 F: drivers/isdn/hardware/eicon/ 3011 3012 IVTV VIDEO4LINUX DRIVER 3013 - M: Hans Verkuil <hverkuil@xs4all.nl> 3014 - L: ivtv-devel@ivtvdriver.org 3015 L: linux-media@vger.kernel.org 3016 T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 3017 W: http://www.ivtvdriver.org
··· 1637 F: sound/pci/cs5535audio/ 1638 1639 CX18 VIDEO4LINUX DRIVER 1640 M: Andy Walls <awalls@radix.net> 1641 + L: ivtv-devel@ivtvdriver.org (moderated for non-subscribers) 1642 L: linux-media@vger.kernel.org 1643 T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 1644 W: http://linuxtv.org ··· 3011 F: drivers/isdn/hardware/eicon/ 3012 3013 IVTV VIDEO4LINUX DRIVER 3014 + M: Andy Walls <awalls@radix.net> 3015 + L: ivtv-devel@ivtvdriver.org (moderated for non-subscribers) 3016 L: linux-media@vger.kernel.org 3017 T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git 3018 W: http://www.ivtvdriver.org
+1 -1
drivers/media/IR/ir-keytable.c
··· 13 */ 14 15 16 - #include <linux/usb/input.h> 17 #include <media/ir-common.h> 18 19 #define IR_TAB_MIN_SIZE 32
··· 13 */ 14 15 16 + #include <linux/input.h> 17 #include <media/ir-common.h> 18 19 #define IR_TAB_MIN_SIZE 32
+8 -4
drivers/media/common/tuners/tda8290.c
··· 144 } 145 146 if (params->mode == V4L2_TUNER_RADIO) { 147 - priv->tda8290_easy_mode = 0x01; /* Start with MN values */ 148 tuner_dbg("setting to radio FM\n"); 149 } else { 150 tuner_dbg("setting tda829x to system %s\n", mode); ··· 673 static int tda8295_probe(struct tuner_i2c_props *i2c_props) 674 { 675 #define TDA8295_ID 0x8a 676 unsigned char tda8295_id[] = { 0x2f, 0x00 }; 677 678 /* detect tda8295 */ 679 tuner_i2c_xfer_send(i2c_props, &tda8295_id[0], 1); 680 tuner_i2c_xfer_recv(i2c_props, &tda8295_id[1], 1); 681 682 - if (tda8295_id[1] == TDA8295_ID) { 683 if (debug) 684 - printk(KERN_DEBUG "%s: tda8295 detected @ %d-%04x\n", 685 - __func__, i2c_adapter_id(i2c_props->adap), 686 i2c_props->addr); 687 return 0; 688 }
··· 144 } 145 146 if (params->mode == V4L2_TUNER_RADIO) { 147 + /* Set TDA8295 to FM radio; Start TDA8290 with MN values */ 148 + priv->tda8290_easy_mode = (priv->ver & TDA8295) ? 0x80 : 0x01; 149 tuner_dbg("setting to radio FM\n"); 150 } else { 151 tuner_dbg("setting tda829x to system %s\n", mode); ··· 672 static int tda8295_probe(struct tuner_i2c_props *i2c_props) 673 { 674 #define TDA8295_ID 0x8a 675 + #define TDA8295C2_ID 0x8b 676 unsigned char tda8295_id[] = { 0x2f, 0x00 }; 677 678 /* detect tda8295 */ 679 tuner_i2c_xfer_send(i2c_props, &tda8295_id[0], 1); 680 tuner_i2c_xfer_recv(i2c_props, &tda8295_id[1], 1); 681 682 + if ((tda8295_id[1] & 0xfe) == TDA8295_ID) { 683 if (debug) 684 + printk(KERN_DEBUG "%s: %s detected @ %d-%04x\n", 685 + __func__, (tda8295_id[1] == TDA8295_ID) ? 686 + "tda8295c1" : "tda8295c2", 687 + i2c_adapter_id(i2c_props->adap), 688 i2c_props->addr); 689 return 0; 690 }
+1 -1
drivers/media/dvb/frontends/dib8000.h
··· 100 static inline enum frontend_tune_state dib8000_get_tune_state(struct dvb_frontend *fe) 101 { 102 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 103 - return CT_SHUTDOWN, 104 } 105 static inline void dib8000_pwm_agc_reset(struct dvb_frontend *fe) 106 {
··· 100 static inline enum frontend_tune_state dib8000_get_tune_state(struct dvb_frontend *fe) 101 { 102 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 103 + return CT_SHUTDOWN; 104 } 105 static inline void dib8000_pwm_agc_reset(struct dvb_frontend *fe) 106 {
+3 -3
drivers/media/dvb/frontends/lgdt3305.h
··· 54 u16 usref_qam256; /* default: 0x2a80 */ 55 56 /* disable i2c repeater - 0:repeater enabled 1:repeater disabled */ 57 - int deny_i2c_rptr:1; 58 59 /* spectral inversion - 0:disabled 1:enabled */ 60 - int spectral_inversion:1; 61 62 /* use RF AGC loop - 0:disabled 1:enabled */ 63 - int rf_agc_loop:1; 64 65 enum lgdt3305_mpeg_mode mpeg_mode; 66 enum lgdt3305_tp_clock_edge tpclk_edge;
··· 54 u16 usref_qam256; /* default: 0x2a80 */ 55 56 /* disable i2c repeater - 0:repeater enabled 1:repeater disabled */ 57 + unsigned int deny_i2c_rptr:1; 58 59 /* spectral inversion - 0:disabled 1:enabled */ 60 + unsigned int spectral_inversion:1; 61 62 /* use RF AGC loop - 0:disabled 1:enabled */ 63 + unsigned int rf_agc_loop:1; 64 65 enum lgdt3305_mpeg_mode mpeg_mode; 66 enum lgdt3305_tp_clock_edge tpclk_edge;
+2
drivers/media/video/gspca/gspca.c
··· 1815 /* put the buffer in the 'queued' queue */ 1816 i = gspca_dev->fr_q; 1817 gspca_dev->fr_queue[i] = index; 1818 gspca_dev->fr_q = (i + 1) % gspca_dev->nframes; 1819 PDEBUG(D_FRAM, "qbuf q:%d i:%d o:%d", 1820 gspca_dev->fr_q,
··· 1815 /* put the buffer in the 'queued' queue */ 1816 i = gspca_dev->fr_q; 1817 gspca_dev->fr_queue[i] = index; 1818 + if (gspca_dev->fr_i == i) 1819 + gspca_dev->cur_frame = frame; 1820 gspca_dev->fr_q = (i + 1) % gspca_dev->nframes; 1821 PDEBUG(D_FRAM, "qbuf q:%d i:%d o:%d", 1822 gspca_dev->fr_q,
+6
drivers/media/video/gspca/m5602/m5602_s5k4aa.c
··· 48 DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xa 2528") 49 } 50 }, { 51 .ident = "Fujitsu-Siemens Amilo Xi 2528", 52 .matches = { 53 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
··· 48 DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xa 2528") 49 } 50 }, { 51 + .ident = "Fujitsu-Siemens Amilo Xi 2428", 52 + .matches = { 53 + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), 54 + DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xi 2428") 55 + } 56 + }, { 57 .ident = "Fujitsu-Siemens Amilo Xi 2528", 58 .matches = { 59 DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+1 -1
drivers/media/video/gspca/ov534.c
··· 1533 static void setsharpness_96(struct gspca_dev *gspca_dev) 1534 { 1535 struct sd *sd = (struct sd *) gspca_dev; 1536 - u8 val; 1537 1538 val = sd->sharpness; 1539 if (val < 0) { /* auto */
··· 1533 static void setsharpness_96(struct gspca_dev *gspca_dev) 1534 { 1535 struct sd *sd = (struct sd *) gspca_dev; 1536 + s8 val; 1537 1538 val = sd->sharpness; 1539 if (val < 0) { /* auto */
+1 -1
drivers/media/video/gspca/sn9c20x.c
··· 2319 } 2320 } 2321 if (avg_lum > MAX_AVG_LUM) { 2322 - if (sd->gain - 1 >= 0) { 2323 sd->gain--; 2324 set_gain(gspca_dev); 2325 }
··· 2319 } 2320 } 2321 if (avg_lum > MAX_AVG_LUM) { 2322 + if (sd->gain >= 1) { 2323 sd->gain--; 2324 set_gain(gspca_dev); 2325 }
+1
drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h
··· 228 /* This reg is written twice. Some kind of reset? */ 229 {NULL, 0x1620, 0x80}, 230 {NULL, 0x1620, 0x00}, 231 {NULL, 0x1423, 0x04}, 232 {x1500, 0x1500, ARRAY_SIZE(x1500)}, 233 {x1536, 0x1536, ARRAY_SIZE(x1536)},
··· 228 /* This reg is written twice. Some kind of reset? */ 229 {NULL, 0x1620, 0x80}, 230 {NULL, 0x1620, 0x00}, 231 + {NULL, 0x1443, 0x00}, 232 {NULL, 0x1423, 0x04}, 233 {x1500, 0x1500, ARRAY_SIZE(x1500)}, 234 {x1536, 0x1536, ARRAY_SIZE(x1536)},
+13 -13
drivers/media/video/gspca/sunplus.c
··· 709 spca504B_PollingDataReady(gspca_dev); 710 711 /* Init the cam width height with some values get on init ? */ 712 - reg_w_riv(gspca_dev, 0x31, 0, 0x04); 713 spca504B_WaitCmdStatus(gspca_dev); 714 spca504B_PollingDataReady(gspca_dev); 715 break; ··· 807 default: 808 /* case BRIDGE_SPCA533: */ 809 /* case BRIDGE_SPCA504B: */ 810 - reg_w_riv(gspca_dev, 0, 0x00, 0x21ad); /* hue */ 811 - reg_w_riv(gspca_dev, 0, 0x01, 0x21ac); /* sat/hue */ 812 - reg_w_riv(gspca_dev, 0, 0x00, 0x21a3); /* gamma */ 813 break; 814 case BRIDGE_SPCA536: 815 - reg_w_riv(gspca_dev, 0, 0x40, 0x20f5); 816 - reg_w_riv(gspca_dev, 0, 0x01, 0x20f4); 817 - reg_w_riv(gspca_dev, 0, 0x00, 0x2089); 818 break; 819 } 820 if (pollreg) ··· 887 switch (sd->bridge) { 888 case BRIDGE_SPCA504B: 889 reg_w_riv(gspca_dev, 0x1d, 0x00, 0); 890 - reg_w_riv(gspca_dev, 0, 0x01, 0x2306); 891 - reg_w_riv(gspca_dev, 0, 0x00, 0x0d04); 892 - reg_w_riv(gspca_dev, 0, 0x00, 0x2000); 893 - reg_w_riv(gspca_dev, 0, 0x13, 0x2301); 894 - reg_w_riv(gspca_dev, 0, 0x00, 0x2306); 895 /* fall thru */ 896 case BRIDGE_SPCA533: 897 spca504B_PollingDataReady(gspca_dev); ··· 1000 spca504B_WaitCmdStatus(gspca_dev); 1001 break; 1002 default: 1003 - reg_w_riv(gspca_dev, 0x31, 0, 0x04); 1004 spca504B_WaitCmdStatus(gspca_dev); 1005 spca504B_PollingDataReady(gspca_dev); 1006 break;
··· 709 spca504B_PollingDataReady(gspca_dev); 710 711 /* Init the cam width height with some values get on init ? */ 712 + reg_w_riv(gspca_dev, 0x31, 0x0004, 0x00); 713 spca504B_WaitCmdStatus(gspca_dev); 714 spca504B_PollingDataReady(gspca_dev); 715 break; ··· 807 default: 808 /* case BRIDGE_SPCA533: */ 809 /* case BRIDGE_SPCA504B: */ 810 + reg_w_riv(gspca_dev, 0, 0x21ad, 0x00); /* hue */ 811 + reg_w_riv(gspca_dev, 0, 0x21ac, 0x01); /* sat/hue */ 812 + reg_w_riv(gspca_dev, 0, 0x21a3, 0x00); /* gamma */ 813 break; 814 case BRIDGE_SPCA536: 815 + reg_w_riv(gspca_dev, 0, 0x20f5, 0x40); 816 + reg_w_riv(gspca_dev, 0, 0x20f4, 0x01); 817 + reg_w_riv(gspca_dev, 0, 0x2089, 0x00); 818 break; 819 } 820 if (pollreg) ··· 887 switch (sd->bridge) { 888 case BRIDGE_SPCA504B: 889 reg_w_riv(gspca_dev, 0x1d, 0x00, 0); 890 + reg_w_riv(gspca_dev, 0x00, 0x2306, 0x01); 891 + reg_w_riv(gspca_dev, 0x00, 0x0d04, 0x00); 892 + reg_w_riv(gspca_dev, 0x00, 0x2000, 0x00); 893 + reg_w_riv(gspca_dev, 0x00, 0x2301, 0x13); 894 + reg_w_riv(gspca_dev, 0x00, 0x2306, 0x00); 895 /* fall thru */ 896 case BRIDGE_SPCA533: 897 spca504B_PollingDataReady(gspca_dev); ··· 1000 spca504B_WaitCmdStatus(gspca_dev); 1001 break; 1002 default: 1003 + reg_w_riv(gspca_dev, 0x31, 0x0004, 0x00); 1004 spca504B_WaitCmdStatus(gspca_dev); 1005 spca504B_PollingDataReady(gspca_dev); 1006 break;
+4
drivers/media/video/gspca/vc032x.c
··· 3009 int l; 3010 3011 frame = gspca_get_i_frame(gspca_dev); 3012 l = frame->data_end - frame->data; 3013 if (len > frame->v4l2_buf.length - l) 3014 len = frame->v4l2_buf.length - l;
··· 3009 int l; 3010 3011 frame = gspca_get_i_frame(gspca_dev); 3012 + if (frame == NULL) { 3013 + gspca_dev->last_packet_type = DISCARD_PACKET; 3014 + return; 3015 + } 3016 l = frame->data_end - frame->data; 3017 if (len > frame->v4l2_buf.length - l) 3018 len = frame->v4l2_buf.length - l;
+1 -1
drivers/media/video/mx1_camera.c
··· 718 719 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 720 irq = platform_get_irq(pdev, 0); 721 - if (!res || !irq) { 722 err = -ENODEV; 723 goto exit; 724 }
··· 718 719 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 720 irq = platform_get_irq(pdev, 0); 721 + if (!res || (int)irq <= 0) { 722 err = -ENODEV; 723 goto exit; 724 }
+1 -1
drivers/media/video/rj54n1cb0c.c
··· 563 struct i2c_client *client = sd->priv; 564 struct rj54n1 *rj54n1 = to_rj54n1(client); 565 struct v4l2_rect *rect = &a->c; 566 - unsigned int dummy, output_w, output_h, 567 input_w = rect->width, input_h = rect->height; 568 int ret; 569
··· 563 struct i2c_client *client = sd->priv; 564 struct rj54n1 *rj54n1 = to_rj54n1(client); 565 struct v4l2_rect *rect = &a->c; 566 + unsigned int dummy = 0, output_w, output_h, 567 input_w = rect->width, input_h = rect->height; 568 int ret; 569
-13
drivers/media/video/saa7134/saa7134-core.c
··· 420 ctrl |= SAA7134_MAIN_CTRL_TE5; 421 irq |= SAA7134_IRQ1_INTE_RA2_1 | 422 SAA7134_IRQ1_INTE_RA2_0; 423 - 424 - /* dma: setup channel 5 (= TS) */ 425 - 426 - saa_writeb(SAA7134_TS_DMA0, (dev->ts.nr_packets - 1) & 0xff); 427 - saa_writeb(SAA7134_TS_DMA1, 428 - ((dev->ts.nr_packets - 1) >> 8) & 0xff); 429 - /* TSNOPIT=0, TSCOLAP=0 */ 430 - saa_writeb(SAA7134_TS_DMA2, 431 - (((dev->ts.nr_packets - 1) >> 16) & 0x3f) | 0x00); 432 - saa_writel(SAA7134_RS_PITCH(5), TS_PACKET_SIZE); 433 - saa_writel(SAA7134_RS_CONTROL(5), SAA7134_RS_CONTROL_BURST_16 | 434 - SAA7134_RS_CONTROL_ME | 435 - (dev->ts.pt_ts.dma >> 12)); 436 } 437 438 /* set task conditions + field handling */
··· 420 ctrl |= SAA7134_MAIN_CTRL_TE5; 421 irq |= SAA7134_IRQ1_INTE_RA2_1 | 422 SAA7134_IRQ1_INTE_RA2_0; 423 } 424 425 /* set task conditions + field handling */
+13
drivers/media/video/saa7134/saa7134-ts.c
··· 250 251 BUG_ON(dev->ts_started); 252 253 saa_writeb(SAA7134_TS_SERIAL1, 0x00); 254 saa_writeb(SAA7134_TS_SERIAL1, 0x03); 255 saa_writeb(SAA7134_TS_SERIAL1, 0x00);
··· 250 251 BUG_ON(dev->ts_started); 252 253 + /* dma: setup channel 5 (= TS) */ 254 + saa_writeb(SAA7134_TS_DMA0, (dev->ts.nr_packets - 1) & 0xff); 255 + saa_writeb(SAA7134_TS_DMA1, 256 + ((dev->ts.nr_packets - 1) >> 8) & 0xff); 257 + /* TSNOPIT=0, TSCOLAP=0 */ 258 + saa_writeb(SAA7134_TS_DMA2, 259 + (((dev->ts.nr_packets - 1) >> 16) & 0x3f) | 0x00); 260 + saa_writel(SAA7134_RS_PITCH(5), TS_PACKET_SIZE); 261 + saa_writel(SAA7134_RS_CONTROL(5), SAA7134_RS_CONTROL_BURST_16 | 262 + SAA7134_RS_CONTROL_ME | 263 + (dev->ts.pt_ts.dma >> 12)); 264 + 265 + /* reset hardware TS buffers */ 266 saa_writeb(SAA7134_TS_SERIAL1, 0x00); 267 saa_writeb(SAA7134_TS_SERIAL1, 0x03); 268 saa_writeb(SAA7134_TS_SERIAL1, 0x00);
+1 -1
drivers/media/video/sh_mobile_ceu_camera.c
··· 1827 1828 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1829 irq = platform_get_irq(pdev, 0); 1830 - if (!res || !irq) { 1831 dev_err(&pdev->dev, "Not enough CEU platform resources.\n"); 1832 err = -ENODEV; 1833 goto exit;
··· 1827 1828 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1829 irq = platform_get_irq(pdev, 0); 1830 + if (!res || (int)irq <= 0) { 1831 dev_err(&pdev->dev, "Not enough CEU platform resources.\n"); 1832 err = -ENODEV; 1833 goto exit;
+1 -1
drivers/media/video/uvc/uvc_ctrl.c
··· 1393 size = entity->processing.bControlSize; 1394 1395 for (i = 0; i < ARRAY_SIZE(blacklist); ++i) { 1396 - if (!usb_match_id(dev->intf, &blacklist[i].id)) 1397 continue; 1398 1399 if (blacklist[i].index >= 8 * size ||
··· 1393 size = entity->processing.bControlSize; 1394 1395 for (i = 0; i < ARRAY_SIZE(blacklist); ++i) { 1396 + if (!usb_match_one_id(dev->intf, &blacklist[i].id)) 1397 continue; 1398 1399 if (blacklist[i].index >= 8 * size ||
+9 -4
drivers/media/video/uvc/uvc_queue.c
··· 59 * returns immediately. 60 * 61 * When the buffer is full, the completion handler removes it from the irq 62 - * queue, marks it as ready (UVC_BUF_STATE_DONE) and wakes its wait queue. 63 * At that point, any process waiting on the buffer will be woken up. If a 64 - * process tries to dequeue a buffer after it has been marked ready, the 65 * dequeing will succeed immediately. 66 * 67 * 2. Buffers are queued, user is waiting on a buffer and the device gets ··· 201 break; 202 case UVC_BUF_STATE_QUEUED: 203 case UVC_BUF_STATE_ACTIVE: 204 v4l2_buf->flags |= V4L2_BUF_FLAG_QUEUED; 205 break; 206 case UVC_BUF_STATE_IDLE: ··· 296 { 297 if (nonblocking) { 298 return (buf->state != UVC_BUF_STATE_QUEUED && 299 - buf->state != UVC_BUF_STATE_ACTIVE) 300 ? 0 : -EAGAIN; 301 } 302 303 return wait_event_interruptible(buf->wait, 304 buf->state != UVC_BUF_STATE_QUEUED && 305 - buf->state != UVC_BUF_STATE_ACTIVE); 306 } 307 308 /* ··· 351 case UVC_BUF_STATE_IDLE: 352 case UVC_BUF_STATE_QUEUED: 353 case UVC_BUF_STATE_ACTIVE: 354 default: 355 uvc_trace(UVC_TRACE_CAPTURE, "[E] Invalid buffer state %u " 356 "(driver bug?).\n", buf->state); ··· 493 494 spin_lock_irqsave(&queue->irqlock, flags); 495 list_del(&buf->queue); 496 if (!list_empty(&queue->irqqueue)) 497 nextbuf = list_first_entry(&queue->irqqueue, struct uvc_buffer, 498 queue);
··· 59 * returns immediately. 60 * 61 * When the buffer is full, the completion handler removes it from the irq 62 + * queue, marks it as done (UVC_BUF_STATE_DONE) and wakes its wait queue. 63 * At that point, any process waiting on the buffer will be woken up. If a 64 + * process tries to dequeue a buffer after it has been marked done, the 65 * dequeing will succeed immediately. 66 * 67 * 2. Buffers are queued, user is waiting on a buffer and the device gets ··· 201 break; 202 case UVC_BUF_STATE_QUEUED: 203 case UVC_BUF_STATE_ACTIVE: 204 + case UVC_BUF_STATE_READY: 205 v4l2_buf->flags |= V4L2_BUF_FLAG_QUEUED; 206 break; 207 case UVC_BUF_STATE_IDLE: ··· 295 { 296 if (nonblocking) { 297 return (buf->state != UVC_BUF_STATE_QUEUED && 298 + buf->state != UVC_BUF_STATE_ACTIVE && 299 + buf->state != UVC_BUF_STATE_READY) 300 ? 0 : -EAGAIN; 301 } 302 303 return wait_event_interruptible(buf->wait, 304 buf->state != UVC_BUF_STATE_QUEUED && 305 + buf->state != UVC_BUF_STATE_ACTIVE && 306 + buf->state != UVC_BUF_STATE_READY); 307 } 308 309 /* ··· 348 case UVC_BUF_STATE_IDLE: 349 case UVC_BUF_STATE_QUEUED: 350 case UVC_BUF_STATE_ACTIVE: 351 + case UVC_BUF_STATE_READY: 352 default: 353 uvc_trace(UVC_TRACE_CAPTURE, "[E] Invalid buffer state %u " 354 "(driver bug?).\n", buf->state); ··· 489 490 spin_lock_irqsave(&queue->irqlock, flags); 491 list_del(&buf->queue); 492 + buf->state = UVC_BUF_STATE_DONE; 493 if (!list_empty(&queue->irqqueue)) 494 nextbuf = list_first_entry(&queue->irqqueue, struct uvc_buffer, 495 queue);
+28 -17
drivers/media/video/uvc/uvc_video.c
··· 441 if (fid != stream->last_fid && buf->buf.bytesused != 0) { 442 uvc_trace(UVC_TRACE_FRAME, "Frame complete (FID bit " 443 "toggled).\n"); 444 - buf->state = UVC_BUF_STATE_DONE; 445 return -EAGAIN; 446 } 447 ··· 470 /* Complete the current frame if the buffer size was exceeded. */ 471 if (len > maxlen) { 472 uvc_trace(UVC_TRACE_FRAME, "Frame complete (overflow).\n"); 473 - buf->state = UVC_BUF_STATE_DONE; 474 } 475 } 476 ··· 482 uvc_trace(UVC_TRACE_FRAME, "Frame complete (EOF found).\n"); 483 if (data[0] == len) 484 uvc_trace(UVC_TRACE_FRAME, "EOF in empty payload.\n"); 485 - buf->state = UVC_BUF_STATE_DONE; 486 if (stream->dev->quirks & UVC_QUIRK_STREAM_NO_FID) 487 stream->last_fid ^= UVC_STREAM_FID; 488 } ··· 568 uvc_video_decode_end(stream, buf, mem, 569 urb->iso_frame_desc[i].actual_length); 570 571 - if (buf->state == UVC_BUF_STATE_DONE || 572 - buf->state == UVC_BUF_STATE_ERROR) 573 buf = uvc_queue_next_buffer(&stream->queue, buf); 574 } 575 } ··· 626 if (!stream->bulk.skip_payload && buf != NULL) { 627 uvc_video_decode_end(stream, buf, stream->bulk.header, 628 stream->bulk.payload_size); 629 - if (buf->state == UVC_BUF_STATE_DONE || 630 - buf->state == UVC_BUF_STATE_ERROR) 631 buf = uvc_queue_next_buffer(&stream->queue, 632 buf); 633 } ··· 667 stream->bulk.payload_size == stream->bulk.max_payload_size) { 668 if (buf->buf.bytesused == stream->queue.buf_used) { 669 stream->queue.buf_used = 0; 670 - buf->state = UVC_BUF_STATE_DONE; 671 uvc_queue_next_buffer(&stream->queue, buf); 672 stream->last_fid ^= UVC_STREAM_FID; 673 } ··· 922 static int uvc_init_video(struct uvc_streaming *stream, gfp_t gfp_flags) 923 { 924 struct usb_interface *intf = stream->intf; 925 - struct usb_host_interface *alts; 926 - struct usb_host_endpoint *ep = NULL; 927 - int intfnum = stream->intfnum; 928 - unsigned int bandwidth, psize, i; 929 int ret; 930 931 stream->last_fid = -1; ··· 932 stream->bulk.payload_size = 0; 933 934 if (intf->num_altsetting > 1) { 935 /* Isochronous endpoint, select the alternate setting. */ 936 bandwidth = stream->ctrl.dwMaxPayloadTransferSize; 937 ··· 951 } 952 953 for (i = 0; i < intf->num_altsetting; ++i) { 954 alts = &intf->altsetting[i]; 955 ep = uvc_find_endpoint(alts, 956 stream->header.bEndpointAddress); ··· 963 /* Check if the bandwidth is high enough. */ 964 psize = le16_to_cpu(ep->desc.wMaxPacketSize); 965 psize = (psize & 0x07ff) * (1 + ((psize >> 11) & 3)); 966 - if (psize >= bandwidth) 967 - break; 968 } 969 970 - if (i >= intf->num_altsetting) { 971 uvc_trace(UVC_TRACE_VIDEO, "No fast enough alt setting " 972 "for requested bandwidth.\n"); 973 return -EIO; 974 } 975 976 - ret = usb_set_interface(stream->dev->udev, intfnum, i); 977 if (ret < 0) 978 return ret; 979 980 - ret = uvc_init_video_isoc(stream, ep, gfp_flags); 981 } else { 982 /* Bulk endpoint, proceed to URB initialization. */ 983 ep = uvc_find_endpoint(&intf->altsetting[0],
··· 441 if (fid != stream->last_fid && buf->buf.bytesused != 0) { 442 uvc_trace(UVC_TRACE_FRAME, "Frame complete (FID bit " 443 "toggled).\n"); 444 + buf->state = UVC_BUF_STATE_READY; 445 return -EAGAIN; 446 } 447 ··· 470 /* Complete the current frame if the buffer size was exceeded. */ 471 if (len > maxlen) { 472 uvc_trace(UVC_TRACE_FRAME, "Frame complete (overflow).\n"); 473 + buf->state = UVC_BUF_STATE_READY; 474 } 475 } 476 ··· 482 uvc_trace(UVC_TRACE_FRAME, "Frame complete (EOF found).\n"); 483 if (data[0] == len) 484 uvc_trace(UVC_TRACE_FRAME, "EOF in empty payload.\n"); 485 + buf->state = UVC_BUF_STATE_READY; 486 if (stream->dev->quirks & UVC_QUIRK_STREAM_NO_FID) 487 stream->last_fid ^= UVC_STREAM_FID; 488 } ··· 568 uvc_video_decode_end(stream, buf, mem, 569 urb->iso_frame_desc[i].actual_length); 570 571 + if (buf->state == UVC_BUF_STATE_READY) 572 buf = uvc_queue_next_buffer(&stream->queue, buf); 573 } 574 } ··· 627 if (!stream->bulk.skip_payload && buf != NULL) { 628 uvc_video_decode_end(stream, buf, stream->bulk.header, 629 stream->bulk.payload_size); 630 + if (buf->state == UVC_BUF_STATE_READY) 631 buf = uvc_queue_next_buffer(&stream->queue, 632 buf); 633 } ··· 669 stream->bulk.payload_size == stream->bulk.max_payload_size) { 670 if (buf->buf.bytesused == stream->queue.buf_used) { 671 stream->queue.buf_used = 0; 672 + buf->state = UVC_BUF_STATE_READY; 673 uvc_queue_next_buffer(&stream->queue, buf); 674 stream->last_fid ^= UVC_STREAM_FID; 675 } ··· 924 static int uvc_init_video(struct uvc_streaming *stream, gfp_t gfp_flags) 925 { 926 struct usb_interface *intf = stream->intf; 927 + struct usb_host_endpoint *ep; 928 + unsigned int i; 929 int ret; 930 931 stream->last_fid = -1; ··· 936 stream->bulk.payload_size = 0; 937 938 if (intf->num_altsetting > 1) { 939 + struct usb_host_endpoint *best_ep = NULL; 940 + unsigned int best_psize = 3 * 1024; 941 + unsigned int bandwidth; 942 + unsigned int uninitialized_var(altsetting); 943 + int intfnum = stream->intfnum; 944 + 945 /* Isochronous endpoint, select the alternate setting. */ 946 bandwidth = stream->ctrl.dwMaxPayloadTransferSize; 947 ··· 949 } 950 951 for (i = 0; i < intf->num_altsetting; ++i) { 952 + struct usb_host_interface *alts; 953 + unsigned int psize; 954 + 955 alts = &intf->altsetting[i]; 956 ep = uvc_find_endpoint(alts, 957 stream->header.bEndpointAddress); ··· 958 /* Check if the bandwidth is high enough. */ 959 psize = le16_to_cpu(ep->desc.wMaxPacketSize); 960 psize = (psize & 0x07ff) * (1 + ((psize >> 11) & 3)); 961 + if (psize >= bandwidth && psize <= best_psize) { 962 + altsetting = i; 963 + best_psize = psize; 964 + best_ep = ep; 965 + } 966 } 967 968 + if (best_ep == NULL) { 969 uvc_trace(UVC_TRACE_VIDEO, "No fast enough alt setting " 970 "for requested bandwidth.\n"); 971 return -EIO; 972 } 973 974 + uvc_trace(UVC_TRACE_VIDEO, "Selecting alternate setting %u " 975 + "(%u B/frame bandwidth).\n", altsetting, best_psize); 976 + 977 + ret = usb_set_interface(stream->dev->udev, intfnum, altsetting); 978 if (ret < 0) 979 return ret; 980 981 + ret = uvc_init_video_isoc(stream, best_ep, gfp_flags); 982 } else { 983 /* Bulk endpoint, proceed to URB initialization. */ 984 ep = uvc_find_endpoint(&intf->altsetting[0],
+3 -2
drivers/media/video/uvc/uvcvideo.h
··· 365 UVC_BUF_STATE_IDLE = 0, 366 UVC_BUF_STATE_QUEUED = 1, 367 UVC_BUF_STATE_ACTIVE = 2, 368 - UVC_BUF_STATE_DONE = 3, 369 - UVC_BUF_STATE_ERROR = 4, 370 }; 371 372 struct uvc_buffer {
··· 365 UVC_BUF_STATE_IDLE = 0, 366 UVC_BUF_STATE_QUEUED = 1, 367 UVC_BUF_STATE_ACTIVE = 2, 368 + UVC_BUF_STATE_READY = 3, 369 + UVC_BUF_STATE_DONE = 4, 370 + UVC_BUF_STATE_ERROR = 5, 371 }; 372 373 struct uvc_buffer {
+1 -3
drivers/staging/cx25821/cx25821-medusa-video.c
··· 860 861 ret_val = medusa_set_videostandard(dev); 862 863 - if (ret_val < 0) { 864 - mutex_unlock(&dev->lock); 865 return -EINVAL; 866 - } 867 868 return 1; 869 }
··· 860 861 ret_val = medusa_set_videostandard(dev); 862 863 + if (ret_val < 0) 864 return -EINVAL; 865 866 return 1; 867 }