Skip to content

Commit

Permalink
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
  ...
  • Loading branch information
Linus Torvalds committed Jan 18, 2010
2 parents 7dc9c48 + 08be64b commit 630ca04
Show file tree
Hide file tree
Showing 23 changed files with 151 additions and 71 deletions.
49 changes: 49 additions & 0 deletions Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -493,3 +493,52 @@ Why: These two features use non-standard interfaces. There are the
Who: Corentin Chary <corentin.chary@gmail.com>

----------------------------

What: usbvideo quickcam_messenger driver
When: 2.6.35
Files: drivers/media/video/usbvideo/quickcam_messenger.[ch]
Why: obsolete v4l1 driver replaced by gspca_stv06xx
Who: Hans de Goede <hdegoede@redhat.com>

----------------------------

What: ov511 v4l1 driver
When: 2.6.35
Files: drivers/media/video/ov511.[ch]
Why: obsolete v4l1 driver replaced by gspca_ov519
Who: Hans de Goede <hdegoede@redhat.com>

----------------------------

What: w9968cf v4l1 driver
When: 2.6.35
Files: drivers/media/video/w9968cf*.[ch]
Why: obsolete v4l1 driver replaced by gspca_ov519
Who: Hans de Goede <hdegoede@redhat.com>

----------------------------

What: ovcamchip sensor framework
When: 2.6.35
Files: drivers/media/video/ovcamchip/*
Why: Only used by obsoleted v4l1 drivers
Who: Hans de Goede <hdegoede@redhat.com>

----------------------------

What: stv680 v4l1 driver
When: 2.6.35
Files: drivers/media/video/stv680.[ch]
Why: obsolete v4l1 driver replaced by gspca_stv0680
Who: Hans de Goede <hdegoede@redhat.com>

----------------------------

What: zc0301 v4l driver
When: 2.6.35
Files: drivers/media/video/zc0301/*
Why: Duplicate functionality with the gspca_zc3xx driver, zc0301 only
supports 2 USB-ID's (because it only supports a limited set of
sensors) wich are also supported by the gspca_zc3xx driver
(which supports 53 USB-ID's in total)
Who: Hans de Goede <hdegoede@redhat.com>
7 changes: 3 additions & 4 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1637,9 +1637,8 @@ S: Maintained
F: sound/pci/cs5535audio/

CX18 VIDEO4LINUX DRIVER
M: Hans Verkuil <hverkuil@xs4all.nl>
M: Andy Walls <awalls@radix.net>
L: ivtv-devel@ivtvdriver.org
L: ivtv-devel@ivtvdriver.org (moderated for non-subscribers)
L: linux-media@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
W: http://linuxtv.org
Expand Down Expand Up @@ -3011,8 +3010,8 @@ S: Maintained
F: drivers/isdn/hardware/eicon/

IVTV VIDEO4LINUX DRIVER
M: Hans Verkuil <hverkuil@xs4all.nl>
L: ivtv-devel@ivtvdriver.org
M: Andy Walls <awalls@radix.net>
L: ivtv-devel@ivtvdriver.org (moderated for non-subscribers)
L: linux-media@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git
W: http://www.ivtvdriver.org
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/IR/ir-keytable.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/


#include <linux/usb/input.h>
#include <linux/input.h>
#include <media/ir-common.h>

#define IR_TAB_MIN_SIZE 32
Expand Down
12 changes: 8 additions & 4 deletions drivers/media/common/tuners/tda8290.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ static void set_audio(struct dvb_frontend *fe,
}

if (params->mode == V4L2_TUNER_RADIO) {
priv->tda8290_easy_mode = 0x01; /* Start with MN values */
/* Set TDA8295 to FM radio; Start TDA8290 with MN values */
priv->tda8290_easy_mode = (priv->ver & TDA8295) ? 0x80 : 0x01;
tuner_dbg("setting to radio FM\n");
} else {
tuner_dbg("setting tda829x to system %s\n", mode);
Expand Down Expand Up @@ -672,16 +673,19 @@ static int tda8290_probe(struct tuner_i2c_props *i2c_props)
static int tda8295_probe(struct tuner_i2c_props *i2c_props)
{
#define TDA8295_ID 0x8a
#define TDA8295C2_ID 0x8b
unsigned char tda8295_id[] = { 0x2f, 0x00 };

/* detect tda8295 */
tuner_i2c_xfer_send(i2c_props, &tda8295_id[0], 1);
tuner_i2c_xfer_recv(i2c_props, &tda8295_id[1], 1);

if (tda8295_id[1] == TDA8295_ID) {
if ((tda8295_id[1] & 0xfe) == TDA8295_ID) {
if (debug)
printk(KERN_DEBUG "%s: tda8295 detected @ %d-%04x\n",
__func__, i2c_adapter_id(i2c_props->adap),
printk(KERN_DEBUG "%s: %s detected @ %d-%04x\n",
__func__, (tda8295_id[1] == TDA8295_ID) ?
"tda8295c1" : "tda8295c2",
i2c_adapter_id(i2c_props->adap),
i2c_props->addr);
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/dvb/frontends/dib8000.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static inline int dib8000_set_tune_state(struct dvb_frontend *fe, enum frontend_
static inline enum frontend_tune_state dib8000_get_tune_state(struct dvb_frontend *fe)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return CT_SHUTDOWN,
return CT_SHUTDOWN;
}
static inline void dib8000_pwm_agc_reset(struct dvb_frontend *fe)
{
Expand Down
6 changes: 3 additions & 3 deletions drivers/media/dvb/frontends/lgdt3305.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ struct lgdt3305_config {
u16 usref_qam256; /* default: 0x2a80 */

/* disable i2c repeater - 0:repeater enabled 1:repeater disabled */
int deny_i2c_rptr:1;
unsigned int deny_i2c_rptr:1;

/* spectral inversion - 0:disabled 1:enabled */
int spectral_inversion:1;
unsigned int spectral_inversion:1;

/* use RF AGC loop - 0:disabled 1:enabled */
int rf_agc_loop:1;
unsigned int rf_agc_loop:1;

enum lgdt3305_mpeg_mode mpeg_mode;
enum lgdt3305_tp_clock_edge tpclk_edge;
Expand Down
2 changes: 2 additions & 0 deletions drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1815,6 +1815,8 @@ static int vidioc_qbuf(struct file *file, void *priv,
/* put the buffer in the 'queued' queue */
i = gspca_dev->fr_q;
gspca_dev->fr_queue[i] = index;
if (gspca_dev->fr_i == i)
gspca_dev->cur_frame = frame;
gspca_dev->fr_q = (i + 1) % gspca_dev->nframes;
PDEBUG(D_FRAM, "qbuf q:%d i:%d o:%d",
gspca_dev->fr_q,
Expand Down
6 changes: 6 additions & 0 deletions drivers/media/video/gspca/m5602/m5602_s5k4aa.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ static
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xa 2528")
}
}, {
.ident = "Fujitsu-Siemens Amilo Xi 2428",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xi 2428")
}
}, {
.ident = "Fujitsu-Siemens Amilo Xi 2528",
.matches = {
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/gspca/ov534.c
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,7 @@ static void setexposure_96(struct gspca_dev *gspca_dev)
static void setsharpness_96(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
u8 val;
s8 val;

val = sd->sharpness;
if (val < 0) { /* auto */
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/gspca/sn9c20x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2319,7 +2319,7 @@ static void do_autogain(struct gspca_dev *gspca_dev, u16 avg_lum)
}
}
if (avg_lum > MAX_AVG_LUM) {
if (sd->gain - 1 >= 0) {
if (sd->gain >= 1) {
sd->gain--;
set_gain(gspca_dev);
}
Expand Down
1 change: 1 addition & 0 deletions drivers/media/video/gspca/stv06xx/stv06xx_vv6410.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ static const struct stv_init stv_bridge_init[] = {
/* This reg is written twice. Some kind of reset? */
{NULL, 0x1620, 0x80},
{NULL, 0x1620, 0x00},
{NULL, 0x1443, 0x00},
{NULL, 0x1423, 0x04},
{x1500, 0x1500, ARRAY_SIZE(x1500)},
{x1536, 0x1536, ARRAY_SIZE(x1536)},
Expand Down
26 changes: 13 additions & 13 deletions drivers/media/video/gspca/sunplus.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ static void spca504B_SetSizeType(struct gspca_dev *gspca_dev)
spca504B_PollingDataReady(gspca_dev);

/* Init the cam width height with some values get on init ? */
reg_w_riv(gspca_dev, 0x31, 0, 0x04);
reg_w_riv(gspca_dev, 0x31, 0x0004, 0x00);
spca504B_WaitCmdStatus(gspca_dev);
spca504B_PollingDataReady(gspca_dev);
break;
Expand Down Expand Up @@ -807,14 +807,14 @@ static void init_ctl_reg(struct gspca_dev *gspca_dev)
default:
/* case BRIDGE_SPCA533: */
/* case BRIDGE_SPCA504B: */
reg_w_riv(gspca_dev, 0, 0x00, 0x21ad); /* hue */
reg_w_riv(gspca_dev, 0, 0x01, 0x21ac); /* sat/hue */
reg_w_riv(gspca_dev, 0, 0x00, 0x21a3); /* gamma */
reg_w_riv(gspca_dev, 0, 0x21ad, 0x00); /* hue */
reg_w_riv(gspca_dev, 0, 0x21ac, 0x01); /* sat/hue */
reg_w_riv(gspca_dev, 0, 0x21a3, 0x00); /* gamma */
break;
case BRIDGE_SPCA536:
reg_w_riv(gspca_dev, 0, 0x40, 0x20f5);
reg_w_riv(gspca_dev, 0, 0x01, 0x20f4);
reg_w_riv(gspca_dev, 0, 0x00, 0x2089);
reg_w_riv(gspca_dev, 0, 0x20f5, 0x40);
reg_w_riv(gspca_dev, 0, 0x20f4, 0x01);
reg_w_riv(gspca_dev, 0, 0x2089, 0x00);
break;
}
if (pollreg)
Expand Down Expand Up @@ -887,11 +887,11 @@ static int sd_init(struct gspca_dev *gspca_dev)
switch (sd->bridge) {
case BRIDGE_SPCA504B:
reg_w_riv(gspca_dev, 0x1d, 0x00, 0);
reg_w_riv(gspca_dev, 0, 0x01, 0x2306);
reg_w_riv(gspca_dev, 0, 0x00, 0x0d04);
reg_w_riv(gspca_dev, 0, 0x00, 0x2000);
reg_w_riv(gspca_dev, 0, 0x13, 0x2301);
reg_w_riv(gspca_dev, 0, 0x00, 0x2306);
reg_w_riv(gspca_dev, 0x00, 0x2306, 0x01);
reg_w_riv(gspca_dev, 0x00, 0x0d04, 0x00);
reg_w_riv(gspca_dev, 0x00, 0x2000, 0x00);
reg_w_riv(gspca_dev, 0x00, 0x2301, 0x13);
reg_w_riv(gspca_dev, 0x00, 0x2306, 0x00);
/* fall thru */
case BRIDGE_SPCA533:
spca504B_PollingDataReady(gspca_dev);
Expand Down Expand Up @@ -1000,7 +1000,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
spca504B_WaitCmdStatus(gspca_dev);
break;
default:
reg_w_riv(gspca_dev, 0x31, 0, 0x04);
reg_w_riv(gspca_dev, 0x31, 0x0004, 0x00);
spca504B_WaitCmdStatus(gspca_dev);
spca504B_PollingDataReady(gspca_dev);
break;
Expand Down
4 changes: 4 additions & 0 deletions drivers/media/video/gspca/vc032x.c
Original file line number Diff line number Diff line change
Expand Up @@ -3009,6 +3009,10 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
int l;

frame = gspca_get_i_frame(gspca_dev);
if (frame == NULL) {
gspca_dev->last_packet_type = DISCARD_PACKET;
return;
}
l = frame->data_end - frame->data;
if (len > frame->v4l2_buf.length - l)
len = frame->v4l2_buf.length - l;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/mx1_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ static int __init mx1_camera_probe(struct platform_device *pdev)

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
irq = platform_get_irq(pdev, 0);
if (!res || !irq) {
if (!res || (int)irq <= 0) {
err = -ENODEV;
goto exit;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/rj54n1cb0c.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ static int rj54n1_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a)
struct i2c_client *client = sd->priv;
struct rj54n1 *rj54n1 = to_rj54n1(client);
struct v4l2_rect *rect = &a->c;
unsigned int dummy, output_w, output_h,
unsigned int dummy = 0, output_w, output_h,
input_w = rect->width, input_h = rect->height;
int ret;

Expand Down
13 changes: 0 additions & 13 deletions drivers/media/video/saa7134/saa7134-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,19 +420,6 @@ int saa7134_set_dmabits(struct saa7134_dev *dev)
ctrl |= SAA7134_MAIN_CTRL_TE5;
irq |= SAA7134_IRQ1_INTE_RA2_1 |
SAA7134_IRQ1_INTE_RA2_0;

/* dma: setup channel 5 (= TS) */

saa_writeb(SAA7134_TS_DMA0, (dev->ts.nr_packets - 1) & 0xff);
saa_writeb(SAA7134_TS_DMA1,
((dev->ts.nr_packets - 1) >> 8) & 0xff);
/* TSNOPIT=0, TSCOLAP=0 */
saa_writeb(SAA7134_TS_DMA2,
(((dev->ts.nr_packets - 1) >> 16) & 0x3f) | 0x00);
saa_writel(SAA7134_RS_PITCH(5), TS_PACKET_SIZE);
saa_writel(SAA7134_RS_CONTROL(5), SAA7134_RS_CONTROL_BURST_16 |
SAA7134_RS_CONTROL_ME |
(dev->ts.pt_ts.dma >> 12));
}

/* set task conditions + field handling */
Expand Down
13 changes: 13 additions & 0 deletions drivers/media/video/saa7134/saa7134-ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,19 @@ int saa7134_ts_start(struct saa7134_dev *dev)

BUG_ON(dev->ts_started);

/* dma: setup channel 5 (= TS) */
saa_writeb(SAA7134_TS_DMA0, (dev->ts.nr_packets - 1) & 0xff);
saa_writeb(SAA7134_TS_DMA1,
((dev->ts.nr_packets - 1) >> 8) & 0xff);
/* TSNOPIT=0, TSCOLAP=0 */
saa_writeb(SAA7134_TS_DMA2,
(((dev->ts.nr_packets - 1) >> 16) & 0x3f) | 0x00);
saa_writel(SAA7134_RS_PITCH(5), TS_PACKET_SIZE);
saa_writel(SAA7134_RS_CONTROL(5), SAA7134_RS_CONTROL_BURST_16 |
SAA7134_RS_CONTROL_ME |
(dev->ts.pt_ts.dma >> 12));

/* reset hardware TS buffers */
saa_writeb(SAA7134_TS_SERIAL1, 0x00);
saa_writeb(SAA7134_TS_SERIAL1, 0x03);
saa_writeb(SAA7134_TS_SERIAL1, 0x00);
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/sh_mobile_ceu_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -1827,7 +1827,7 @@ static int __devinit sh_mobile_ceu_probe(struct platform_device *pdev)

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
irq = platform_get_irq(pdev, 0);
if (!res || !irq) {
if (!res || (int)irq <= 0) {
dev_err(&pdev->dev, "Not enough CEU platform resources.\n");
err = -ENODEV;
goto exit;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/uvc/uvc_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ uvc_ctrl_prune_entity(struct uvc_device *dev, struct uvc_entity *entity)
size = entity->processing.bControlSize;

for (i = 0; i < ARRAY_SIZE(blacklist); ++i) {
if (!usb_match_id(dev->intf, &blacklist[i].id))
if (!usb_match_one_id(dev->intf, &blacklist[i].id))
continue;

if (blacklist[i].index >= 8 * size ||
Expand Down
13 changes: 9 additions & 4 deletions drivers/media/video/uvc/uvc_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
* returns immediately.
*
* When the buffer is full, the completion handler removes it from the irq
* queue, marks it as ready (UVC_BUF_STATE_DONE) and wakes its wait queue.
* queue, marks it as done (UVC_BUF_STATE_DONE) and wakes its wait queue.
* At that point, any process waiting on the buffer will be woken up. If a
* process tries to dequeue a buffer after it has been marked ready, the
* process tries to dequeue a buffer after it has been marked done, the
* dequeing will succeed immediately.
*
* 2. Buffers are queued, user is waiting on a buffer and the device gets
Expand Down Expand Up @@ -201,6 +201,7 @@ static void __uvc_query_buffer(struct uvc_buffer *buf,
break;
case UVC_BUF_STATE_QUEUED:
case UVC_BUF_STATE_ACTIVE:
case UVC_BUF_STATE_READY:
v4l2_buf->flags |= V4L2_BUF_FLAG_QUEUED;
break;
case UVC_BUF_STATE_IDLE:
Expand Down Expand Up @@ -295,13 +296,15 @@ static int uvc_queue_waiton(struct uvc_buffer *buf, int nonblocking)
{
if (nonblocking) {
return (buf->state != UVC_BUF_STATE_QUEUED &&
buf->state != UVC_BUF_STATE_ACTIVE)
buf->state != UVC_BUF_STATE_ACTIVE &&
buf->state != UVC_BUF_STATE_READY)
? 0 : -EAGAIN;
}

return wait_event_interruptible(buf->wait,
buf->state != UVC_BUF_STATE_QUEUED &&
buf->state != UVC_BUF_STATE_ACTIVE);
buf->state != UVC_BUF_STATE_ACTIVE &&
buf->state != UVC_BUF_STATE_READY);
}

/*
Expand Down Expand Up @@ -348,6 +351,7 @@ int uvc_dequeue_buffer(struct uvc_video_queue *queue,
case UVC_BUF_STATE_IDLE:
case UVC_BUF_STATE_QUEUED:
case UVC_BUF_STATE_ACTIVE:
case UVC_BUF_STATE_READY:
default:
uvc_trace(UVC_TRACE_CAPTURE, "[E] Invalid buffer state %u "
"(driver bug?).\n", buf->state);
Expand Down Expand Up @@ -489,6 +493,7 @@ struct uvc_buffer *uvc_queue_next_buffer(struct uvc_video_queue *queue,

spin_lock_irqsave(&queue->irqlock, flags);
list_del(&buf->queue);
buf->state = UVC_BUF_STATE_DONE;
if (!list_empty(&queue->irqqueue))
nextbuf = list_first_entry(&queue->irqqueue, struct uvc_buffer,
queue);
Expand Down
Loading

0 comments on commit 630ca04

Please sign in to comment.