diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-13 19:22:22 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-13 19:22:22 -0800 |
commit | d8c532c40721f7507896d202b8cae3b3642d2b0d (patch) | |
tree | 42b1ce76671eb85324281ed93491432f4523f983 /drivers/staging/media | |
parent | e777d192ffb9f2929d547a2f8a5f65b7db7a9552 (diff) | |
parent | 77c53d0b56264a8fc5844e087ad15fffe20c299d (diff) | |
download | op-kernel-dev-d8c532c40721f7507896d202b8cae3b3642d2b0d.zip op-kernel-dev-d8c532c40721f7507896d202b8cae3b3642d2b0d.tar.gz |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
- Missing MAINTAINERS entries were added for several drivers
- Adds V4L2 support for DMABUF handling, allowing zero-copy buffer
sharing between V4L2 devices and GPU
- Got rid of all warnings when compiling with W=1 on x86
- Add a new driver for Exynos hardware (s3c-camif)
- Several bug fixes, cleanups and driver improvements
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (243 commits)
[media] omap3isp: Replace cpu_is_omap3630() with ISP revision check
[media] omap3isp: Prepare/unprepare clocks before/after enable/disable
[media] omap3isp: preview: Add support for 8-bit formats at the sink pad
[media] omap3isp: Replace printk with dev_*
[media] omap3isp: Find source pad from external entity
[media] omap3isp: Configure CSI-2 phy based on platform data
[media] omap3isp: Add PHY routing configuration
[media] omap3isp: Add CSI configuration registers from control block to ISP resources
[media] omap3isp: Remove unneeded module memory address definitions
[media] omap3isp: Use monotonic timestamps for statistics buffers
[media] uvcvideo: Fix control value clamping for unsigned integer controls
[media] uvcvideo: Mark first output terminal as default video node
[media] uvcvideo: Add VIDIOC_[GS]_PRIORITY support
[media] uvcvideo: Return -ENOTTY for unsupported ioctls
[media] uvcvideo: Set device_caps in VIDIOC_QUERYCAP
[media] uvcvideo: Don't fail when an unsupported format is requested
[media] uvcvideo: Return -EACCES when trying to access a read/write-only control
[media] uvcvideo: Set error_idx properly for extended controls API failures
[media] rtl28xxu: add NOXON DAB/DAB+ USB dongle rev 2
[media] fc2580: write some registers conditionally
...
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/dt3155v4l/dt3155v4l.c | 4 | ||||
-rw-r--r-- | drivers/staging/media/go7007/go7007-fw.c | 42 | ||||
-rw-r--r-- | drivers/staging/media/go7007/go7007-v4l2.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/go7007/s2250-board.c | 13 | ||||
-rw-r--r-- | drivers/staging/media/go7007/wis-ov7640.c | 20 | ||||
-rw-r--r-- | drivers/staging/media/go7007/wis-saa7113.c | 20 | ||||
-rw-r--r-- | drivers/staging/media/go7007/wis-saa7115.c | 20 | ||||
-rw-r--r-- | drivers/staging/media/go7007/wis-sony-tuner.c | 13 | ||||
-rw-r--r-- | drivers/staging/media/go7007/wis-tw2804.c | 13 | ||||
-rw-r--r-- | drivers/staging/media/go7007/wis-tw9903.c | 13 | ||||
-rw-r--r-- | drivers/staging/media/go7007/wis-uda1342.c | 13 | ||||
-rw-r--r-- | drivers/staging/media/lirc/lirc_serial.c | 6 |
12 files changed, 46 insertions, 133 deletions
diff --git a/drivers/staging/media/dt3155v4l/dt3155v4l.c b/drivers/staging/media/dt3155v4l/dt3155v4l.c index 2389103..479c643 100644 --- a/drivers/staging/media/dt3155v4l/dt3155v4l.c +++ b/drivers/staging/media/dt3155v4l/dt3155v4l.c @@ -396,7 +396,9 @@ dt3155_open(struct file *filp) pd->q->drv_priv = pd; pd->curr_buf = NULL; pd->field_count = 0; - vb2_queue_init(pd->q); /* cannot fail */ + ret = vb2_queue_init(pd->q); + if (ret < 0) + return ret; INIT_LIST_HEAD(&pd->dmaq); spin_lock_init(&pd->lock); /* disable all irqs, clear all irq flags */ diff --git a/drivers/staging/media/go7007/go7007-fw.c b/drivers/staging/media/go7007/go7007-fw.c index c9a6409..f99c05b 100644 --- a/drivers/staging/media/go7007/go7007-fw.c +++ b/drivers/staging/media/go7007/go7007-fw.c @@ -382,8 +382,8 @@ static int gen_mjpeghdr_to_package(struct go7007 *go, __le16 *code, int space) buf = kzalloc(4096, GFP_KERNEL); if (buf == NULL) { - printk(KERN_ERR "go7007: unable to allocate 4096 bytes for " - "firmware construction\n"); + dev_err(go->dev, + "unable to allocate 4096 bytes for firmware construction\n"); return -1; } @@ -652,8 +652,8 @@ static int gen_mpeg1hdr_to_package(struct go7007 *go, buf = kzalloc(5120, GFP_KERNEL); if (buf == NULL) { - printk(KERN_ERR "go7007: unable to allocate 5120 bytes for " - "firmware construction\n"); + dev_err(go->dev, + "unable to allocate 5120 bytes for firmware construction\n"); return -1; } framelen[0] = mpeg1_frame_header(go, buf, 0, 1, PFRAME); @@ -839,8 +839,8 @@ static int gen_mpeg4hdr_to_package(struct go7007 *go, buf = kzalloc(5120, GFP_KERNEL); if (buf == NULL) { - printk(KERN_ERR "go7007: unable to allocate 5120 bytes for " - "firmware construction\n"); + dev_err(go->dev, + "unable to allocate 5120 bytes for firmware construction\n"); return -1; } framelen[0] = mpeg4_frame_header(go, buf, 0, PFRAME); @@ -1545,9 +1545,8 @@ static int do_special(struct go7007 *go, u16 type, __le16 *code, int space, case SPECIAL_MODET: return modet_to_package(go, code, space); } - printk(KERN_ERR - "go7007: firmware file contains unsupported feature %04x\n", - type); + dev_err(go->dev, + "firmware file contains unsupported feature %04x\n", type); return -1; } @@ -1577,15 +1576,16 @@ int go7007_construct_fw_image(struct go7007 *go, u8 **fw, int *fwlen) return -1; } if (request_firmware(&fw_entry, go->board_info->firmware, go->dev)) { - printk(KERN_ERR - "go7007: unable to load firmware from file \"%s\"\n", + dev_err(go->dev, + "unable to load firmware from file \"%s\"\n", go->board_info->firmware); return -1; } code = kzalloc(codespace * 2, GFP_KERNEL); if (code == NULL) { - printk(KERN_ERR "go7007: unable to allocate %d bytes for " - "firmware construction\n", codespace * 2); + dev_err(go->dev, + "unable to allocate %d bytes for firmware construction\n", + codespace * 2); goto fw_failed; } src = (__le16 *)fw_entry->data; @@ -1594,9 +1594,9 @@ int go7007_construct_fw_image(struct go7007 *go, u8 **fw, int *fwlen) chunk_flags = __le16_to_cpu(src[0]); chunk_len = __le16_to_cpu(src[1]); if (chunk_len + 2 > srclen) { - printk(KERN_ERR "go7007: firmware file \"%s\" " - "appears to be corrupted\n", - go->board_info->firmware); + dev_err(go->dev, + "firmware file \"%s\" appears to be corrupted\n", + go->board_info->firmware); goto fw_failed; } if (chunk_flags & mode_flag) { @@ -1604,17 +1604,15 @@ int go7007_construct_fw_image(struct go7007 *go, u8 **fw, int *fwlen) ret = do_special(go, __le16_to_cpu(src[2]), &code[i], codespace - i, framelen); if (ret < 0) { - printk(KERN_ERR "go7007: insufficient " - "memory for firmware " - "construction\n"); + dev_err(go->dev, + "insufficient memory for firmware construction\n"); goto fw_failed; } i += ret; } else { if (codespace - i < chunk_len) { - printk(KERN_ERR "go7007: insufficient " - "memory for firmware " - "construction\n"); + dev_err(go->dev, + "insufficient memory for firmware construction\n"); goto fw_failed; } memcpy(&code[i], &src[2], chunk_len * 2); diff --git a/drivers/staging/media/go7007/go7007-v4l2.c b/drivers/staging/media/go7007/go7007-v4l2.c index 980371b..a78133b 100644 --- a/drivers/staging/media/go7007/go7007-v4l2.c +++ b/drivers/staging/media/go7007/go7007-v4l2.c @@ -812,7 +812,7 @@ static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf) return retval; mutex_lock(&gofh->lock); - if (buf->index < 0 || buf->index >= gofh->buf_count) + if (buf->index >= gofh->buf_count) goto unlock_and_return; gobuf = &gofh->bufs[buf->index]; diff --git a/drivers/staging/media/go7007/s2250-board.c b/drivers/staging/media/go7007/s2250-board.c index 014d384..b397410 100644 --- a/drivers/staging/media/go7007/s2250-board.c +++ b/drivers/staging/media/go7007/s2250-board.c @@ -688,15 +688,4 @@ static struct i2c_driver s2250_driver = { .id_table = s2250_id, }; -static __init int init_s2250(void) -{ - return i2c_add_driver(&s2250_driver); -} - -static __exit void exit_s2250(void) -{ - i2c_del_driver(&s2250_driver); -} - -module_init(init_s2250); -module_exit(exit_s2250); +module_i2c_driver(s2250_driver); diff --git a/drivers/staging/media/go7007/wis-ov7640.c b/drivers/staging/media/go7007/wis-ov7640.c index 6bc9470..9f01657f 100644 --- a/drivers/staging/media/go7007/wis-ov7640.c +++ b/drivers/staging/media/go7007/wis-ov7640.c @@ -29,8 +29,7 @@ struct wis_ov7640 { int hue; }; -static u8 initial_registers[] = -{ +static u8 initial_registers[] = { 0x12, 0x80, 0x12, 0x54, 0x14, 0x24, @@ -60,12 +59,12 @@ static int wis_ov7640_probe(struct i2c_client *client, client->flags = I2C_CLIENT_SCCB; - printk(KERN_DEBUG + dev_dbg(&client->dev, "wis-ov7640: initializing OV7640 at address %d on %s\n", client->addr, adapter->name); if (write_regs(client, initial_registers) < 0) { - printk(KERN_ERR "wis-ov7640: error initializing OV7640\n"); + dev_err(&client->dev, "wis-ov7640: error initializing OV7640\n"); return -ENODEV; } @@ -92,17 +91,6 @@ static struct i2c_driver wis_ov7640_driver = { .id_table = wis_ov7640_id, }; -static int __init wis_ov7640_init(void) -{ - return i2c_add_driver(&wis_ov7640_driver); -} - -static void __exit wis_ov7640_cleanup(void) -{ - i2c_del_driver(&wis_ov7640_driver); -} - -module_init(wis_ov7640_init); -module_exit(wis_ov7640_cleanup); +module_i2c_driver(wis_ov7640_driver); MODULE_LICENSE("GPL v2"); diff --git a/drivers/staging/media/go7007/wis-saa7113.c b/drivers/staging/media/go7007/wis-saa7113.c index 05e0e10..8810c1e 100644 --- a/drivers/staging/media/go7007/wis-saa7113.c +++ b/drivers/staging/media/go7007/wis-saa7113.c @@ -32,8 +32,7 @@ struct wis_saa7113 { int hue; }; -static u8 initial_registers[] = -{ +static u8 initial_registers[] = { 0x01, 0x08, 0x02, 0xc0, 0x03, 0x33, @@ -282,12 +281,12 @@ static int wis_saa7113_probe(struct i2c_client *client, dec->hue = 0; i2c_set_clientdata(client, dec); - printk(KERN_DEBUG + dev_dbg(&client->dev, "wis-saa7113: initializing SAA7113 at address %d on %s\n", client->addr, adapter->name); if (write_regs(client, initial_registers) < 0) { - printk(KERN_ERR + dev_err(&client->dev, "wis-saa7113: error initializing SAA7113\n"); kfree(dec); return -ENODEV; @@ -320,17 +319,6 @@ static struct i2c_driver wis_saa7113_driver = { .id_table = wis_saa7113_id, }; -static int __init wis_saa7113_init(void) -{ - return i2c_add_driver(&wis_saa7113_driver); -} - -static void __exit wis_saa7113_cleanup(void) -{ - i2c_del_driver(&wis_saa7113_driver); -} - -module_init(wis_saa7113_init); -module_exit(wis_saa7113_cleanup); +module_i2c_driver(wis_saa7113_driver); MODULE_LICENSE("GPL v2"); diff --git a/drivers/staging/media/go7007/wis-saa7115.c b/drivers/staging/media/go7007/wis-saa7115.c index 46cff59..fa86acd 100644 --- a/drivers/staging/media/go7007/wis-saa7115.c +++ b/drivers/staging/media/go7007/wis-saa7115.c @@ -32,8 +32,7 @@ struct wis_saa7115 { int hue; }; -static u8 initial_registers[] = -{ +static u8 initial_registers[] = { 0x01, 0x08, 0x02, 0xc0, 0x03, 0x20, @@ -415,12 +414,12 @@ static int wis_saa7115_probe(struct i2c_client *client, dec->hue = 0; i2c_set_clientdata(client, dec); - printk(KERN_DEBUG + dev_dbg(&client->dev, "wis-saa7115: initializing SAA7115 at address %d on %s\n", client->addr, adapter->name); if (write_regs(client, initial_registers) < 0) { - printk(KERN_ERR + dev_err(&client->dev, "wis-saa7115: error initializing SAA7115\n"); kfree(dec); return -ENODEV; @@ -453,17 +452,6 @@ static struct i2c_driver wis_saa7115_driver = { .id_table = wis_saa7115_id, }; -static int __init wis_saa7115_init(void) -{ - return i2c_add_driver(&wis_saa7115_driver); -} - -static void __exit wis_saa7115_cleanup(void) -{ - i2c_del_driver(&wis_saa7115_driver); -} - -module_init(wis_saa7115_init); -module_exit(wis_saa7115_cleanup); +module_i2c_driver(wis_saa7115_driver); MODULE_LICENSE("GPL v2"); diff --git a/drivers/staging/media/go7007/wis-sony-tuner.c b/drivers/staging/media/go7007/wis-sony-tuner.c index 8f1b7d4..1291ab7 100644 --- a/drivers/staging/media/go7007/wis-sony-tuner.c +++ b/drivers/staging/media/go7007/wis-sony-tuner.c @@ -704,17 +704,6 @@ static struct i2c_driver wis_sony_tuner_driver = { .id_table = wis_sony_tuner_id, }; -static int __init wis_sony_tuner_init(void) -{ - return i2c_add_driver(&wis_sony_tuner_driver); -} - -static void __exit wis_sony_tuner_cleanup(void) -{ - i2c_del_driver(&wis_sony_tuner_driver); -} - -module_init(wis_sony_tuner_init); -module_exit(wis_sony_tuner_cleanup); +module_i2c_driver(wis_sony_tuner_driver); MODULE_LICENSE("GPL v2"); diff --git a/drivers/staging/media/go7007/wis-tw2804.c b/drivers/staging/media/go7007/wis-tw2804.c index 9134f03..d6410ee 100644 --- a/drivers/staging/media/go7007/wis-tw2804.c +++ b/drivers/staging/media/go7007/wis-tw2804.c @@ -341,17 +341,6 @@ static struct i2c_driver wis_tw2804_driver = { .id_table = wis_tw2804_id, }; -static int __init wis_tw2804_init(void) -{ - return i2c_add_driver(&wis_tw2804_driver); -} - -static void __exit wis_tw2804_cleanup(void) -{ - i2c_del_driver(&wis_tw2804_driver); -} - -module_init(wis_tw2804_init); -module_exit(wis_tw2804_cleanup); +module_i2c_driver(wis_tw2804_driver); MODULE_LICENSE("GPL v2"); diff --git a/drivers/staging/media/go7007/wis-tw9903.c b/drivers/staging/media/go7007/wis-tw9903.c index 9230f4a..94071de 100644 --- a/drivers/staging/media/go7007/wis-tw9903.c +++ b/drivers/staging/media/go7007/wis-tw9903.c @@ -325,17 +325,6 @@ static struct i2c_driver wis_tw9903_driver = { .id_table = wis_tw9903_id, }; -static int __init wis_tw9903_init(void) -{ - return i2c_add_driver(&wis_tw9903_driver); -} - -static void __exit wis_tw9903_cleanup(void) -{ - i2c_del_driver(&wis_tw9903_driver); -} - -module_init(wis_tw9903_init); -module_exit(wis_tw9903_cleanup); +module_i2c_driver(wis_tw9903_driver); MODULE_LICENSE("GPL v2"); diff --git a/drivers/staging/media/go7007/wis-uda1342.c b/drivers/staging/media/go7007/wis-uda1342.c index 0127be2..05ac798 100644 --- a/drivers/staging/media/go7007/wis-uda1342.c +++ b/drivers/staging/media/go7007/wis-uda1342.c @@ -98,17 +98,6 @@ static struct i2c_driver wis_uda1342_driver = { .id_table = wis_uda1342_id, }; -static int __init wis_uda1342_init(void) -{ - return i2c_add_driver(&wis_uda1342_driver); -} - -static void __exit wis_uda1342_cleanup(void) -{ - i2c_del_driver(&wis_uda1342_driver); -} - -module_init(wis_uda1342_init); -module_exit(wis_uda1342_cleanup); +module_i2c_driver(wis_uda1342_driver); MODULE_LICENSE("GPL v2"); diff --git a/drivers/staging/media/lirc/lirc_serial.c b/drivers/staging/media/lirc/lirc_serial.c index 71e3bf2..b5d0088 100644 --- a/drivers/staging/media/lirc/lirc_serial.c +++ b/drivers/staging/media/lirc/lirc_serial.c @@ -1239,6 +1239,10 @@ static int __init lirc_serial_init_module(void) } } + /* make sure sense is either -1, 0, or 1 */ + if (sense != -1) + sense = !!sense; + result = lirc_serial_init(); if (result) return result; @@ -1298,7 +1302,7 @@ MODULE_PARM_DESC(irq, "Interrupt (4 or 3)"); module_param(share_irq, bool, S_IRUGO); MODULE_PARM_DESC(share_irq, "Share interrupts (0 = off, 1 = on)"); -module_param(sense, bool, S_IRUGO); +module_param(sense, int, S_IRUGO); MODULE_PARM_DESC(sense, "Override autodetection of IR receiver circuit" " (0 = active high, 1 = active low )"); |