summaryrefslogtreecommitdiff
path: root/drivers/media/pci
AgeCommit message (Collapse)Author
2015-06-06[media] cx23885: Hauppauge WinTV-HVR4400/HVR5500 bind I2C demod and SECAntti Palosaari
Bind tda10071 demod and a8293 SEC using I2C binding. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-06[media] cx23885: Hauppauge WinTV Starburst bind I2C demod and SECAntti Palosaari
Bind tda10071 demod and a8293 SEC using I2C binding. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-06[media] cx23885: add support for DVB I2C SEC clientAntti Palosaari
Add support for I2C SEC (satellite equipment controller) client. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05[media] cobalt: simplify colorspace codeHans Verkuil
Simplify cobalt_g/try_fmt_vid_cap by not setting the colorspace fields in pix again (since v4l2_fill_pix_format does that already), and by using v4l2_fill_mbus_format in cobalt_s_fmt_vid_out which allows the get_fmt call to be dropped as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05[media] cobalt: support transfer functionHans Verkuil
Add support for the transfer function to the cobalt driver: make sure it is passed on to/retrieved from the sub-device correctly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05[media] ivtv: fix two smatch warningsMauro Carvalho Chehab
Smatch currently produces two warnings: drivers/media/pci/ivtv/ivtv-fileops.c:901 ivtv_v4l2_close() warn: suspicious bitop condition drivers/media/pci/ivtv/ivtv-fileops.c:1026 ivtv_open() warn: suspicious bitop condition Those are false positives, but it is not hard to get rid of them by using a different way to evaluate the macro, splitting the logical boolean evaluation from the bitmap one. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05[media] bt8xx: remove needless checkMauro Carvalho Chehab
As reported by smatch: drivers/media/pci/bt8xx/dst_ca.c:323 ca_get_message() warn: this array is probably non-NULL. 'p_ca_message->msg' drivers/media/pci/bt8xx/dst_ca.c:498 ca_send_message() warn: this array is probably non-NULL. 'p_ca_message->msg' Those two checks are needless/useless, as the ca_msg struct is declared as: typedef struct ca_msg { unsigned int index; unsigned int type; unsigned int length; unsigned char msg[256]; } ca_msg_t; So, if the p_ca_message pointer is not null, msg will also be not null. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] ivtv: fix incorrect audio mode report in log_statusHans Verkuil
The log_status ioctl should report if the audio input has mode Bilingual. However, the check against the itv->dualwatch_stereo_mode is completely wrong and is a left-over from the distant past. Not only is the bitmask obviously wrong, the test itself is broken too since itv->dualwatch_stereo_mode is no longer a bitmask at all. Fix this code properly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] adv7604/cobalt: missing GPIOLIB dependencyHans Verkuil
The adv7604 driver depends on GPIOLIB, and therefore cobalt depends on it as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] saa7164: fix sparse warningHans Verkuil
drivers/media/pci/saa7164/saa7164-i2c.c:45:33: warning: Using plain integer as NULL pointer Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] cobalt: fix sparse warningsHans Verkuil
drivers/media/pci/cobalt/cobalt-v4l2.c:189:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:191:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:192:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:193:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:194:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:195:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:196:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:197:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:198:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:199:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:201:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:202:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:203:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:234:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:240:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:246:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:266:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:267:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:271:28: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:275:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:276:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:312:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:313:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:314:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:315:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:317:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:320:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:321:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:321:36: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:324:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:327:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:328:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:328:41: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:329:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:331:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:332:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:334:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:335:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:336:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:362:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:367:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:368:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:420:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:421:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:422:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:423:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:516:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:516:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:518:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:518:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:518:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:525:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:525:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:531:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:546:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:546:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:548:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:549:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:550:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:551:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:552:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:553:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:554:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:555:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:556:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:556:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:556:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:563:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:564:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:564:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:569:9: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:595:16: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-v4l2.c:602:9: warning: dereference of noderef expression Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] cobalt: fix sparse warningsHans Verkuil
drivers/media/pci/cobalt/cobalt-i2c.c:130:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:147:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:151:26: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:156:34: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:206:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:210:26: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:215:34: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:225:27: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:335:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:336:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:337:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:348:34: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:352:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:353:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:356:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:357:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-i2c.c:359:17: warning: dereference of noderef expression Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] cobalt: fix sparse warningsHans Verkuil
drivers/media/pci/cobalt/cobalt-irq.c:62:33: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:64:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:65:23: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:72:21: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:73:25: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:74:25: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:82:33: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:83:33: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:91:25: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:94:23: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:103:25: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:107:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:109:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:116:13: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:119:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:120:17: warning: dereference of noderef expression drivers/media/pci/cobalt/cobalt-irq.c:122:17: warning: dereference of noderef expression Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] cobalt: fix sparse warningsHans Verkuil
drivers/media/pci/cobalt/cobalt-flash.c:101:5: warning: symbol 'cobalt_flash_probe' was not declared. Should it be static? drivers/media/pci/cobalt/cobalt-flash.c:126:6: warning: symbol 'cobalt_flash_remove' was not declared. Should it be static? drivers/media/pci/cobalt/cobalt-cpld.c:101:6: warning: symbol 'cobalt_cpld_status' was not declared. Should it be static? drivers/media/pci/cobalt/cobalt-cpld.c:240:6: warning: symbol 'cobalt_cpld_set_freq' was not declared. Should it be static? Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] cobalt: fix sparse warningsHans Verkuil
drivers/media/pci/cobalt/cobalt-flash.c:39:36: warning: incorrect type in initializer (different address spaces) drivers/media/pci/cobalt/cobalt-flash.c:54:36: warning: incorrect type in initializer (different address spaces) drivers/media/pci/cobalt/cobalt-flash.c:63:36: warning: incorrect type in initializer (different address spaces) drivers/media/pci/cobalt/cobalt-flash.c:82:36: warning: incorrect type in initializer (different address spaces) drivers/media/pci/cobalt/cobalt-flash.c:107:19: warning: incorrect type in assignment (different address spaces) Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] cobalt: fix compiler warnings on 32 bit OSesHans Verkuil
Fixes these warnings: drivers/media/pci/cobalt/cobalt-omnitek.c: In function 'omni_sg_dma_start': drivers/media/pci/cobalt/cobalt-omnitek.c:112:28: warning: right shift count >= width of type [-Wshift-count-overflow] iowrite32((u32)(desc->bus >> 32), DESCRIPTOR(s->dma_channel) + 4); ^ drivers/media/pci/cobalt/cobalt-omnitek.c: In function 'descriptor_list_create': drivers/media/pci/cobalt/cobalt-omnitek.c:222:28: warning: right shift count >= width of type [-Wshift-count-overflow] d->next_h = (u32)(next >> 32); ^ drivers/media/pci/cobalt/cobalt-omnitek.c:268:32: warning: right shift count >= width of type [-Wshift-count-overflow] d->next_h = (u32)(desc->bus >> 32); ^ drivers/media/pci/cobalt/cobalt-omnitek.c:275:27: warning: right shift count >= width of type [-Wshift-count-overflow] d->next_h = (u32)(next >> 32); ^ drivers/media/pci/cobalt/cobalt-omnitek.c: In function 'descriptor_list_chain': drivers/media/pci/cobalt/cobalt-omnitek.c:293:31: warning: right shift count >= width of type [-Wshift-count-overflow] d->next_h = (u32)(next->bus >> 32); ^ drivers/media/pci/cobalt/cobalt-omnitek.c: In function 'descriptor_list_loopback': drivers/media/pci/cobalt/cobalt-omnitek.c:332:30: warning: right shift count >= width of type [-Wshift-count-overflow] d->next_h = (u32)(desc->bus >> 32); ^ Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] cobalt: fix 64-bit division link errorHans Verkuil
[linuxtv-media:master 1023/1029] ERROR: "__aeabi_uldivmod" [drivers/media/pci/cobalt/cobalt.ko] undefined! Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] cobalt: fix irqs used for the adv7511 transmitterHans Verkuil
The interrupt bit assignments use for the adv7511 were off by one. This means that the current scheme (bit << (4 * stream_index)) can no longer be used. Fix this by precalculating and storing the correct masks in the cobalt_stream struct. This wasn't noticed before because the adv7511 interrupts are very rare. But for CEC support these interrupts are essential, so this made me realize that it wasn't working correctly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-26cx25821: cx25821-medusa-reg.h: fix 0x0x prefixAntonio Ospite
Fix the 0x0x prefix in integer constants. In this case a padding 0 must also be inserted to make the constants look like all the other 16 bits ones. Signed-off-by: Antonio Ospite <ao2@ao2.it> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: linux-media@vger.kernel.org Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2015-05-20[media] cobalt: add new driverHans Verkuil
The cobalt device is a PCIe card with 4 HDMI inputs (adv7604) and a connector that can be used to hook up an adv7511 transmitter or an adv7842 receiver daughterboard. This device is used within Cisco but is sadly not available outside of Cisco. Nevertheless it is a very interesting driver that can serve as an example of how to support HDMI hardware and how to use the popular adv devices. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-18[media] sta2x11: use monotonic timestampHans Verkuil
V4L2 drivers should use MONOTONIC timestamps instead of gettimeofday, which is affected by daylight savings time. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Federico Vaga <federico.vaga@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-14[media] saa7164: use an MSI interrupt when availableBrendan McGrath
Enhances driver to use an MSI interrupt when available. Adds the module option 'enable_msi' (type bool) which by default is enabled. Can be set to 'N' to disable. Fixes (or can reduce the occurrence of) a crash which is most commonly reported when both digital tuners of the saa7164 chip is in use. A reported example can be found here: http://permalink.gmane.org/gmane.linux.drivers.video-input-infrastructure/83948 Reviewed-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Brendan McGrath <redmcg@redmandi.dyndns.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] cx25821: cx25821-medusa-reg.h: fix 0x0x prefixAntonio Ospite
Fix the 0x0x prefix in integer constants. In this case a padding 0 must also be inserted to make the constants look like all the other 16 bits ones. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: fix CodingStyle issues on the lines touched by pr_foo refactorMauro Carvalho Chehab
Several lines touched by the pr_foo refactoring patches are not following the Linux Coding style. While we won't be fixing the style globally at the driver, we should, at least, fix on the lines we touched. Basically, this patch add (or remove) whitespaces and blank lines where needed. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: avoid complex macro warningsMauro Carvalho Chehab
The debug macros are not properly defined, as they generate warnings like: ERROR: Macros with complex values should be enclosed in parentheses +#define core_dbg(fmt, arg...) if (core_debug) \ + printk(KERN_DEBUG pr_fmt("core: " fmt), ## arg) Use do { } while (0) for those macros. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: replace remaining occurences or printk()Mauro Carvalho Chehab
Instead of using printk(), use pr_foo() macros. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134-i2c: simplify debug dump and use pr_info()Mauro Carvalho Chehab
Instead of implement its own hexdump logic, use the printk format, and convert to use pr_info(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: change the debug macros for IR inputMauro Carvalho Chehab
Rename the macros to input_dbg() and ir_dbg(), using pr_fmt() on both, to be coherent with the other debug macro changes. The ir_dbg() also prints the IR name. I'm not sure if it is a good idea to keep both macros here, but merging them would require tests on different flavors of saaa7134-based boards. So, for now, let's keep both. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: change the debug macros for video and vbiMauro Carvalho Chehab
rename the macro to vbi_dbg()/video_dbg() and use pr_fmt(), to be coherent with the other debug macro changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: change the debug macros for saa7134-tvaudioMauro Carvalho Chehab
use just one macro instead of 2, naming it as audio_dbg() and using pr_fmt(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134-ts: use pr_fmt() at the debug macroMauro Carvalho Chehab
instead of using dev->name, let's use pr_fmt() like on the other parts of saa7134. Also, rename the debug macro to ts_dbg() to match the namespace for the debug macros. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134-i2c: make debug macros to use pr_fmt()Mauro Carvalho Chehab
Converting debug prints to use pr_foo() is not trivial, as the result will be a way worse than what's provided here, due to the pieces of the code that prints the I2C transfers. Those use a lot pr_cont(), and, depending on using either level 1 or 2, a different set of macros are selected. So, let's replace d1printk() and d2printk() macros by i2c_dbg() and i2c_count() adding a debug level there. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: better handle core debug messagesMauro Carvalho Chehab
On media drivers, debugging messages should be grouped into categories, as this makes easier to debug the driver. In the case of saa7134, the core has 2 debug categories, one for IRQ, and another one for the core itself. The IRQ have actually 2 levels of debug. So, instead of using pr_dbg(), where everything would be in the same box, let's define two macros that use pr_fmt(), one for the core, and another one for irq. With that, we can replace the remaining printk() occurrences at the core to use either core_dbg() or irq_dbg(), depending on the group of debug macros that need to be enabled. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: use pr_warn() on some places where no KERN_foo were usedMauro Carvalho Chehab
On a few places, mostly during board detection, some printk() macros were called without especifying any message level. Those are actually warnings. So, use pr_warn() for them. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134-empress: use pr_debug() for the saa7134 empress moduleMauro Carvalho Chehab
As this module doesn't use any debug level, it is easy to just replace all debug printks by pr_debug(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134-dvb: use pr_debug() for the saa7134 dvb moduleMauro Carvalho Chehab
As this module doesn't use any debug level, it is easy to just replace all debug printks by pr_debug(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134-dvb: get rid of wprintk() macroMauro Carvalho Chehab
wprintk() macro is now just a wrapper for pr_warn(). Get rid of it! Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134-alsa: use pr_debug() instead of printkMauro Carvalho Chehab
On saa7134-alsa, there is just one printk macro that use a different debug level. It should be easy to enable/disable this one using dynamic_printk, if one need to individually control it. So, this module can easily use pr_debug() instead of using its own macros. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: fix a few other occurrences of KERN_INFO/KERN_WARNINGMauro Carvalho Chehab
On a few places, the search expression used on the script that replaced pr_info/pr_warn didn't match, because the string were on the next line. It is best to manually edit those lines, and re-indent the paragraphs. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: instead of using printk KERN_foo, use pr_fooMauro Carvalho Chehab
Replaces all occurrences of printk with KERN_INFO, KERN_WARNING and KERN_ERR to pr_info/pr_warning, pr_err, using this small shell script: for i in drivers/media/pci/saa7134/*.[ch]; do sed s,'printk(KERN_INFO ','pr_info(',g <$i >a && mv a $i; done for i in drivers/media/pci/saa7134/*.[ch]; do sed s,'printk(KERN_ERR ','pr_err(',g <$i >a && mv a $i; done for i in drivers/media/pci/saa7134/*.[ch]; do sed s,'printk(KERN_WARNING ','pr_warn(',g <$i >a && mv a $i; done Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: prepare to use pr_foo macrosMauro Carvalho Chehab
Add a pr_fmt macro, and move saa7134.h header to the beginning, to avoid warnings when using the pr_foo macros. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-12[media] si2157: support selection of IF interfaceOlli Salonen
The chips supported by the si2157 driver have two IF outputs (either pins 12+13 or pins 9+11). Instead of hardcoding the output to be used add an option to choose which output shall be used. As this patch changes the default behaviour, the IF interface is specified in each driver currently using si2157 driver. This is to keep bisectability. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-12[media] mantis: fix error handlingSilvan Jegen
Remove dead code, make goto label names more expressive and add a label in order to call mantis_dvb_exit if mantis_uart_init fails. Also make sure that mantis_pci_exit is called if we fail the mantis_stream_control call and that we call mantis_i2c_exit if mantis_get_mac fails. [mchehab@osg.samsung.com: fix merge conflict] Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: fix compiler warningHans Verkuil
drivers/media/pci/saa7164/saa7164-dvb.c: In function ‘saa7164_dvb_register’: drivers/media/pci/saa7164/saa7164-dvb.c:701:7: warning: ‘client_tuner’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (!client_tuner || !client_tuner->dev.driver) ^ Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] v4l2: replace s_mbus_fmt by set_fmt in bridge driversHans Verkuil
Replace all calls to s_mbus_fmt in bridge drivers by calls to the set_fmt pad op. Remove the old try/s_mbus_fmt video ops since they are now no longer used. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] v4l2: replace try_mbus_fmt by set_fmt in bridge driversHans Verkuil
Replace all calls to try_mbus_fmt in bridge drivers by calls to the set_fmt pad op. [mchehab@osg.samsung.com: fix a merge conflict at mcam-core.c] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] v4l2: replace s_mbus_fmt by set_fmtHans Verkuil
The s_mbus_fmt video op is a duplicate of the pad op. Replace all uses in sub-devices by the set_fmt() pad op. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] v4l2: replace video op g_mbus_fmt by pad op get_fmtHans Verkuil
The g_mbus_fmt video op is a duplicate of the pad op. Replace all uses by the get_fmt pad op and remove the video op. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Cc: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01dt3155: fix CodingStyle issuesMauro Carvalho Chehab
There are a few lines longer than 80 cols for no good reason. Fix them sooner than latter, making checkpatch.pl happy. Cc: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] dt3155: add GFP_DMA32 flag to vb2 queueHans Verkuil
Ensure that buffers are allocated from the DMA32 zone since this device only handles 32 bit DMA addresses. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>