aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/saa7164 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-07-12[media] saa7164: drop unused saa7164_ctrl structHans Verkuil1-4/+0
No longer used, can be removed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] saa7164: Replace if and BUG with BUG_ONAmitoj Kaur Chawla1-4/+2
Replace if condition and BUG() with a BUG_ON having the conditional expression of the if statement as argument. The Coccinelle semantic patch used to make this change is as follows: @@ expression E,f; @@ ( if (<+... f(...) ...+>) { BUG(); } | - if (E) { BUG(); } + BUG_ON(E); ) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2015-11-20various: fix pci_set_dma_mask return value checkingChristoph Hellwig1-2/+2
pci_set_dma_mask returns a negative errno value, not a bool like pci_dma_supported. This of course was just a giant test for attention :) Signed-off-by: Christoph Hellwig <hch@lst.de> Reported-by: Jongman Heo <jongman.heo@samsung.com> Tested-by: Jongman Heo <jongman.heo@samsung.com> [pcnet32] Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: Hans Verkuil <hverkuil@xs4all.nl> Cc: Antti Palosaari <crope@iki.fi> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-10saa7164: use pci_set_dma_mask insted of pci_dma_supportedChristoph Hellwig1-1/+1
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: Hans Verkuil <hverkuil@xs4all.nl> Cc: Steven Toth <stoth@kernellabs.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-10-01[media] saa7164: video and vbi ports share the same input/tuner/stdHans Verkuil3-204/+82
The vbi port should pass any tuner/input/standard information on to the video port since in the input and tuner are shared between the two. There is no reason to duplicate this code, just pass the ioctls on to the video encoder port. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] saa7164: fix input and tuner compliance problemsHans Verkuil2-10/+20
- the frequency range was never set - there was no initial frequency - missing index/tuner checks - inconsistent standard reporting - removed unnecessary tuner type checks (the core handles that) - clamp frequency to the valid frequency range as per the V4L2 spec Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] saa7164: remove unused videobuf referencesHans Verkuil2-3/+0
This driver includes videobuf headers and selects VIDEOBUF_DVB, but videobuf isn't used at all. Remove this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] saa7164: fix format ioctlsHans Verkuil3-125/+20
Fix various v4l2-compliance issues in the formatting ioctls: - the vbi device implemented video format ioctls which make no senses for a vbi device, remove them. - remove the unused ts_packet_size and ts_packet_count fields. - fill in colorspace and field. - fill in sizeimage with a default value. - for the video node the get, set and try format functions all do the same thing, so combine into a single function. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] saa7164: add support for control eventsHans Verkuil2-2/+7
Now that saa7164 uses v4l2_fh and that poll() has been fixed, it is trivial to add support for control events. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] saa7164: fix poll bugsHans Verkuil1-11/+4
- poll doesn't return negative values, so you can't return -EINVAL. Instead return POLLERR. - poll can't be called if !video_is_registered(), so this test can be dropped. - poll can never do a blocking wait, so remove that check. - poll shouldn't attempt to start streaming if the caller isn't interested in read events. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] saa7164: add v4l2_fh supportHans Verkuil3-4/+12
Control events require the use of struct v4l2_fh. Add this to saa7164. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] saa7164: convert to the control frameworkHans Verkuil3-742/+81
Convert this driver to the control framework. Note that the VBI device nodes have no controls as there is nothing to control. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-10[media] saa7164: Improvements for I2C handling"Olli Salonen1-10/+1
This reverts commit ad90b6b0f10566d4a5546e27fe455ce3b5e6b6c7. This patch breaks I2C communication towards Si2168. After reverting and applying the other patch in this series the I2C communication is correct. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-10[media] saa7164: change Si2168 reglen to 0 bitOlli Salonen1-2/+2
The i2c_reg_len for Si2168 should be 0 for correct I2C communication. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] saa7164: fix sparse warningHans Verkuil1-1/+1
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-14[media] saa7164: use an MSI interrupt when availableBrendan McGrath2-7/+60
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-12[media] si2157: support selection of IF interfaceOlli Salonen1-0/+3
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-01[media] saa7164: fix compiler warningHans Verkuil1-1/+1
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-01saa7164: Fix CodingStyle issues added on previous patchesMauro Carvalho Chehab2-15/+22
The patches that added support for HVR2255 and HVR2205 added some CodingStyle issues. Better to fix it sooner than latter. Cc: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: fix querycap warningHans Verkuil2-10/+12
Fix the VIDIOC_QUERYCAP warning due to the missing device_caps. Don't fill in the version field, the V4L2 core will do that for you. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: <stable@vger.kernel.org> # for v3.19 and up Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: fix HVR2255 ATSC inversion issueSteven Toth1-1/+1
QAM mode in the LGDT3306 auto detects inversion. VSB does not. Forgot to include tis fact in the original patch set. Tested with QAM and VSB after this patch, working fine. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: Copyright updateSteven Toth14-14/+14
Updates the copyright notes at the saa7164 driver. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: Add Digital TV support for the HVR2255 and HVR2205Steven Toth3-14/+407
Adding support for the Hauppauge HVR2255 and Hauppauge HVR2205 PCIe cards. Digital TV for DVB-T and ATSC/US-Cable is known to work. Support for analog RF tuners does not work due to a lack of analog support in the upstream SI2157 driver. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: Improvements for I2C handlingSteven Toth1-1/+10
Workaround oddball I2C issues caused by using newer SILABS devices. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: Adding additional I2C debugSteven Toth1-3/+5
Assists with debugging difficult I2C devices. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: I2C improvements for upcoming HVR2255/2205 boardsSteven Toth1-3/+4
SI2168/SI2157 issue single byte address reads. Add support for these. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] saa7164: Check if dev is NULL before dereferencing itMauro Carvalho Chehab1-6/+8
As reported by smatch: drivers/media/pci/saa7164/saa7164-core.c:631 saa7164_irq() warn: variable dereferenced before check 'dev' (see line 621) Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-03[media] saa7164: free_irq before pci_disable_deviceOlli Salonen1-2/+2
Free the IRQ before disabling the device. Otherwise errors like this when unloading the module: [21135.458560] ------------[ cut here ]------------ [21135.458569] WARNING: CPU: 4 PID: 1696 at /home/apw/COD/linux/fs/proc/generic.c:521 remove_proc_entry+0x1a1/0x1b0() [21135.458572] remove_proc_entry: removing non-empty directory 'irq/47', leaking at least 'saa7164[0]' Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-11[media] saa7164: fix sparse warningsHans Verkuil6-58/+74
Fix many sparse warnings: drivers/media/pci/saa7164/saa7164-core.c:97:18: warning: cast removes address space of expression drivers/media/pci/saa7164/saa7164-core.c:122:31: warning: cast removes address space of expression drivers/media/pci/saa7164/saa7164-core.c:122:31: warning: incorrect type in initializer (different address spaces) drivers/media/pci/saa7164/saa7164-core.c:122:31: expected unsigned char [noderef] [usertype] <asn:2>*bufcpu drivers/media/pci/saa7164/saa7164-core.c:122:31: got unsigned char [usertype] *<noident> drivers/media/pci/saa7164/saa7164-core.c:282:44: warning: cast removes address space of expression drivers/media/pci/saa7164/saa7164-core.c:286:38: warning: cast removes address space of expression drivers/media/pci/saa7164/saa7164-core.c:286:35: warning: incorrect type in assignment (different address spaces) drivers/media/pci/saa7164/saa7164-core.c:286:35: expected unsigned char [noderef] [usertype] <asn:2>*p drivers/media/pci/saa7164/saa7164-core.c:286:35: got unsigned char [usertype] *<noident> drivers/media/pci/saa7164/saa7164-core.c:352:44: warning: cast removes address space of expression drivers/media/pci/saa7164/saa7164-core.c:527:53: warning: cast removes address space of expression drivers/media/pci/saa7164/saa7164-core.c:129:30: warning: dereference of noderef expression drivers/media/pci/saa7164/saa7164-core.c:133:38: warning: dereference of noderef expression drivers/media/pci/saa7164/saa7164-core.c:133:72: warning: dereference of noderef expression drivers/media/pci/saa7164/saa7164-core.c:134:35: warning: dereference of noderef expression drivers/media/pci/saa7164/saa7164-core.c:287:61: warning: dereference of noderef expression drivers/media/pci/saa7164/saa7164-core.c:288:65: warning: dereference of noderef expression drivers/media/pci/saa7164/saa7164-core.c:289:65: warning: dereference of noderef expression drivers/media/pci/saa7164/saa7164-core.c:290:65: warning: dereference of noderef expression drivers/media/pci/saa7164/saa7164-core.c:291:65: warning: dereference of noderef expression drivers/media/pci/saa7164/saa7164-core.c:292:65: warning: dereference of noderef expression drivers/media/pci/saa7164/saa7164-core.c:293:65: warning: dereference of noderef expression drivers/media/pci/saa7164/saa7164-core.c:294:65: warning: dereference of noderef expression drivers/media/pci/saa7164/saa7164-fw.c:548:52: warning: incorrect type in argument 5 (different address spaces) drivers/media/pci/saa7164/saa7164-fw.c:548:52: expected unsigned char [usertype] *dst drivers/media/pci/saa7164/saa7164-fw.c:548:52: got unsigned char [noderef] [usertype] <asn:2>* drivers/media/pci/saa7164/saa7164-fw.c:579:44: warning: incorrect type in argument 5 (different address spaces) drivers/media/pci/saa7164/saa7164-fw.c:579:44: expected unsigned char [usertype] *dst drivers/media/pci/saa7164/saa7164-fw.c:579:44: got unsigned char [noderef] [usertype] <asn:2>* drivers/media/pci/saa7164/saa7164-fw.c:597:44: warning: incorrect type in argument 5 (different address spaces) drivers/media/pci/saa7164/saa7164-fw.c:597:44: expected unsigned char [usertype] *dst drivers/media/pci/saa7164/saa7164-fw.c:597:44: got unsigned char [noderef] [usertype] <asn:2>* drivers/media/pci/saa7164/saa7164-bus.c:36:36: warning: cast removes address space of expression drivers/media/pci/saa7164/saa7164-bus.c:41:36: warning: cast removes address space of expression drivers/media/pci/saa7164/saa7164-bus.c:151:19: warning: incorrect type in assignment (different base types) drivers/media/pci/saa7164/saa7164-bus.c:151:19: expected unsigned short [unsigned] [usertype] size drivers/media/pci/saa7164/saa7164-bus.c:151:19: got restricted __le16 [usertype] <noident> drivers/media/pci/saa7164/saa7164-bus.c:152:22: warning: incorrect type in assignment (different base types) drivers/media/pci/saa7164/saa7164-bus.c:152:22: expected unsigned int [unsigned] [usertype] command drivers/media/pci/saa7164/saa7164-bus.c:152:22: got restricted __le32 [usertype] <noident> drivers/media/pci/saa7164/saa7164-bus.c:153:30: warning: incorrect type in assignment (different base types) drivers/media/pci/saa7164/saa7164-bus.c:153:30: expected unsigned short [unsigned] [usertype] controlselector drivers/media/pci/saa7164/saa7164-bus.c:153:30: got restricted __le16 [usertype] <noident> drivers/media/pci/saa7164/saa7164-bus.c:172:20: warning: cast to restricted __le32 drivers/media/pci/saa7164/saa7164-bus.c:173:20: warning: cast to restricted __le32 drivers/media/pci/saa7164/saa7164-bus.c:206:28: warning: cast to restricted __le32 drivers/media/pci/saa7164/saa7164-bus.c:287:9: warning: incorrect type in argument 1 (different base types) drivers/media/pci/saa7164/saa7164-bus.c:287:9: expected unsigned int [unsigned] val drivers/media/pci/saa7164/saa7164-bus.c:287:9: got restricted __le32 [usertype] <noident> drivers/media/pci/saa7164/saa7164-bus.c:339:20: warning: cast to restricted __le32 drivers/media/pci/saa7164/saa7164-bus.c:340:20: warning: cast to restricted __le32 drivers/media/pci/saa7164/saa7164-bus.c:463:9: warning: incorrect type in argument 1 (different base types) drivers/media/pci/saa7164/saa7164-bus.c:463:9: expected unsigned int [unsigned] val drivers/media/pci/saa7164/saa7164-bus.c:463:9: got restricted __le32 [usertype] <noident> drivers/media/pci/saa7164/saa7164-bus.c:466:21: warning: cast to restricted __le16 drivers/media/pci/saa7164/saa7164-bus.c:467:24: warning: cast to restricted __le32 drivers/media/pci/saa7164/saa7164-bus.c:468:32: warning: cast to restricted __le16 drivers/media/pci/saa7164/saa7164-buffer.c:122:18: warning: incorrect type in assignment (different address spaces) drivers/media/pci/saa7164/saa7164-buffer.c:122:18: expected unsigned long long [noderef] [usertype] <asn:2>*cpu drivers/media/pci/saa7164/saa7164-buffer.c:122:18: got void * drivers/media/pci/saa7164/saa7164-buffer.c:127:21: warning: incorrect type in assignment (different address spaces) drivers/media/pci/saa7164/saa7164-buffer.c:127:21: expected unsigned long long [noderef] [usertype] <asn:2>*pt_cpu drivers/media/pci/saa7164/saa7164-buffer.c:127:21: got void * drivers/media/pci/saa7164/saa7164-buffer.c:134:20: warning: cast removes address space of expression drivers/media/pci/saa7164/saa7164-buffer.c:156:63: warning: incorrect type in argument 3 (different address spaces) drivers/media/pci/saa7164/saa7164-buffer.c:156:63: expected void *vaddr drivers/media/pci/saa7164/saa7164-buffer.c:156:63: got unsigned long long [noderef] [usertype] <asn:2>*cpu drivers/media/pci/saa7164/saa7164-buffer.c:179:57: warning: incorrect type in argument 3 (different address spaces) drivers/media/pci/saa7164/saa7164-buffer.c:179:57: expected void *vaddr drivers/media/pci/saa7164/saa7164-buffer.c:179:57: got unsigned long long [noderef] [usertype] <asn:2>*cpu drivers/media/pci/saa7164/saa7164-buffer.c:180:56: warning: incorrect type in argument 3 (different address spaces) drivers/media/pci/saa7164/saa7164-buffer.c:180:56: expected void *vaddr drivers/media/pci/saa7164/saa7164-buffer.c:180:56: got unsigned long long [noderef] [usertype] <asn:2>*pt_cpu drivers/media/pci/saa7164/saa7164-buffer.c:84:17: warning: dereference of noderef expression drivers/media/pci/saa7164/saa7164-buffer.c:147:31: warning: dereference of noderef expression drivers/media/pci/saa7164/saa7164-buffer.c:148:17: warning: dereference of noderef expression Most are caused by pointers marked as __iomem when they aren't or not marked as __iomem when they should. Also note that readl/writel already do endian conversion, so there is no need to do it again. saa7164_bus_set/get were a bit tricky: you have to make sure the msg endian conversion is done at the right time, and that the code isn't using fields that are still little endian instead of cpu-endianness. The approach chosen is to convert just before writing to the ring buffer and to convert it back right after reading from the ring buffer. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] saa7164-core: declare symbols as staticMauro Carvalho Chehab1-3/+3
Those symbols are used only at saa7164-core. drivers/media/pci/saa7164/saa7164-core.c:55:14: warning: symbol 'fw_debug' was not declared. Should it be static? drivers/media/pci/saa7164/saa7164-core.c:75:14: warning: symbol 'print_histogram' was not declared. Should it be static? drivers/media/pci/saa7164/saa7164-core.c:83:14: warning: symbol 'guard_checking' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-03[media] saa7164: just return 0 instead of using a varMauro Carvalho Chehab1-2/+1
Instead of allocating a var to store 0 and just return it, change the code to return 0 directly. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17[media] saa7164-dvb: Remove unnecessary null testHimangi Saraogi1-18/+14
This patch removes the null test on dvb. dvb is initialized at the beginning of the function to &port->dvb. Since port is dereferenced prior to the null test, port must be a valid pointer, and &port->dvb cannot be null. The following Coccinelle script is used for detecting the change: @r@ expression e,f; identifier g,y; statement S1,S2; @@ *e = &f->g <+... f->y ...+> *if (e != NULL || ...) S1 else S2 Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-11-29[media] saa7164: fix return value check in saa7164_initdev()Wei Yongjun1-1/+3
In case of error, the function kthread_run() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-17[media] misc drivers: remove deprecated IRQF_DISABLEDMichael Opdenacker1-1/+1
This patch proposes to remove the use of the IRQF_DISABLED flag It's a NOOP since 2.6.35 and it will be removed one day. Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-17[media] pci: saa7164: Remove redundant pci_set_drvdataSachin Kamat1-1/+0
Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-06-28[media] saa7164: fix compiler warningHans Verkuil1-1/+2
build/media_build/v4l/saa7164-core.c: In function 'saa7164_initdev': build/media_build/v4l/saa7164-core.c:1192:6: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized] int err, i; ^ Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-21[media] saa7164: add v4l2_device and replace parent with v4l2_devHans Verkuil4-2/+12
This driver did not yet support struct v4l2_device, so add it. This make it possible to replace the deprecated parent field with the v4l2_dev field, allowing the eventual removal of the parent field. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-17[media] saa7164: replace current_norm by g_stdHans Verkuil3-2/+25
current_norm is deprecated. Replace it by g_std. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-17[media] v4l2: remove g_chip_ident from bridge drivers where it is easy to do soHans Verkuil3-47/+0
VIDIOC_DBG_G_CHIP_IDENT has been replaced by VIDIOC_DBG_G_CHIP_INFO. Remove g_chip_ident support from bridge drivers since it is no longer needed. This patch takes care of all the trivial cases. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-27[media] media: pci: remove duplicate checks for EPERMLad, Prabhakar1-6/+0
This patch removes check for EPERM in dbg_g/s_register and vidioc_g/s_register as this check is already performed by core. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-30Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-mediaLinus Torvalds2-13/+13
Pull media update from Mauro Carvalho Chehab: - OF documentation and patches at core and drivers, to be used by for embedded media systems - some I2C drivers used on go7007 were rewritten/promoted from staging: sony-btf-mpx, tw2804, tw9903, tw9906, wis-ov7640, wis-uda1342 - add fimc-is driver (Exynos) - add a new radio driver: radio-si476x - add a two new tuners: r820t and tuner_it913x - split camera code on em28xx driver and add more models - the cypress firmware load is used outside dvb usb drivers. So, move it to a common directory to make easier to re-use it - siano media driver updated to work with sms2270 devices - several work done in order to promote go7007 and solo6x1x out of staging (still, there are some pending issues) - several API compliance fixes at v4l2 drivers that don't behave as expected - as usual, lots of driver fixes, improvements, cleanups and new device addition at the existing drivers. * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (831 commits) [media] cx88: make core less verbose [media] em28xx: fix oops at em28xx_dvb_bus_ctrl() [media] s5c73m3: fix indentation of the help section in Kconfig [media] cx25821-alsa: get rid of a __must_check warning [media] cx25821-video: declare cx25821_vidioc_s_std as static [media] cx25821-video: remove maxw from cx25821_vidioc_try_fmt_vid_cap [media] r820t: Remove a warning for an unused value [media] dib0090: Fix a warning at dib0090_set_EFUSE [media] dib8000: fix a warning [media] dib8000: Fix sub-channel range [media] dib8000: store dtv_property_cache in a temp var [media] dib8000: warning fix: declare internal functions as static [media] r820t: quiet gcc warning on n_ring [media] r820t: memory leak in release() [media] r820t: precendence bug in r820t_xtal_check() [media] videodev2.h: Remove the unused old V4L1 buffer types [media] anysee: Grammar s/report the/report to/ [media] anysee: Initialize ret = 0 in anysee_frontend_attach() [media] media: videobuf2: fix the length check for mmap [media] em28xx: save isoc endpoint number for DVB only if endpoint has alt settings with xMaxPacketSize != 0 ...
2013-04-12treewide: Fix typo in printksMasanari Iida1-1/+1
Correct spelling typos in printk and comments. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-03-24[media] v4l2: add const to argument of write-only s_register ioctlHans Verkuil1-1/+1
This ioctl is defined as IOW, so pass the argument as const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] v4l2: pass std by value to the write-only s_std ioctlHans Verkuil2-8/+8
This ioctl is defined as IOW, so pass the argument by value instead of by reference. I could have chosen to add const instead, but this is 1) easier to handle in drivers and 2) consistent with the s_std subdev operation. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Jonathan Corbet <corbet@lwn.net> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] v4l2: add const to argument of write-only s_tuner ioctlHans Verkuil2-2/+2
This ioctl is defined as IOW, so pass the argument as const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24[media] v4l2: add const to argument of write-only s_frequency ioctlHans Verkuil2-2/+2
This ioctl is defined as IOW, so pass the argument as const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05[media] saa7164: silence GCC warningsPaul Bolle1-0/+2
Compiling the saa7164 driver without CONFIG_VIDEO_ADV_DEBUG set triggers these GCC warnings: drivers/media/pci/saa7164/saa7164-encoder.c:1301:12: warning: ‘saa7164_g_register’ defined but not used [-Wunused-function] drivers/media/pci/saa7164/saa7164-encoder.c:1314:12: warning: ‘saa7164_s_register’ defined but not used [-Wunused-function] Silence these warnings by wrapping these two functions in an "#ifdef CONFIG_VIDEO_ADV_DEBUG" and "#endif" pair. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-03Drivers: media: remove __dev* attributes.Greg Kroah-Hartman1-4/+4
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-28[media] saa7134,saa7164: warning: comparison of unsigned fixesMauro Carvalho Chehab1-2/+2
drivers/media/pci/saa7134/saa7134-core.c:947:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] drivers/media/pci/saa7164/saa7164-core.c:413:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] drivers/media/pci/saa7164/saa7164-core.c:489:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] drivers/media/pci/saa7134/saa7134-video.c:2514:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27[media] saa7164: get rid of warning: no previous prototypeMauro Carvalho Chehab6-36/+41
drivers/media/pci/saa7164/saa7164-api.c:1489:5: warning: no previous prototype for 'saa7164_api_modify_gpio' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-api.c:168:5: warning: no previous prototype for 'saa7164_api_set_gop_size' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-api.c:622:5: warning: no previous prototype for 'saa7164_api_set_dif' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-api.c:825:5: warning: no previous prototype for 'saa7164_api_configure_port_vbi' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-api.c:861:5: warning: no previous prototype for 'saa7164_api_configure_port_mpeg2ts' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-api.c:895:5: warning: no previous prototype for 'saa7164_api_configure_port_mpeg2ps' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-api.c:928:5: warning: no previous prototype for 'saa7164_api_dump_subdevs' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-bus.c:109:6: warning: no previous prototype for 'saa7164_bus_dumpmsg' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-bus.c:84:6: warning: no previous prototype for 'saa7164_bus_verify' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-cmd.c:135:5: warning: no previous prototype for 'saa7164_cmd_dequeue' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-cmd.c:189:5: warning: no previous prototype for 'saa7164_cmd_set' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-cmd.c:262:5: warning: no previous prototype for 'saa7164_cmd_wait' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-cmd.c:26:5: warning: no previous prototype for 'saa7164_cmd_alloc_seqno' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-cmd.c:45:6: warning: no previous prototype for 'saa7164_cmd_free_seqno' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-cmd.c:57:6: warning: no previous prototype for 'saa7164_cmd_timeout_seqno' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-cmd.c:67:5: warning: no previous prototype for 'saa7164_cmd_timeout_get' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-encoder.c:1104:29: warning: no previous prototype for 'saa7164_enc_next_buf' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-encoder.c:1290:5: warning: no previous prototype for 'saa7164_g_chip_ident' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-encoder.c:1300:5: warning: no previous prototype for 'saa7164_g_register' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-encoder.c:1313:5: warning: no previous prototype for 'saa7164_s_register' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-fw.c:40:5: warning: no previous prototype for 'saa7164_dl_wait_ack' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-fw.c:56:5: warning: no previous prototype for 'saa7164_dl_wait_clr' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-fw.c:74:5: warning: no previous prototype for 'saa7164_downloadimage' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-vbi.c:1050:29: warning: no previous prototype for 'saa7164_vbi_next_buf' [-Wmissing-prototypes] drivers/media/pci/saa7164/saa7164-vbi.c:987:5: warning: no previous prototype for 'saa7164_vbi_fmt' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>