summaryrefslogtreecommitdiff
path: root/drivers/media/radio
AgeCommit message (Collapse)Author
2015-06-22[media] si470x: cleanup define namespaceMauro Carvalho Chehab
Some architectures already use CHIPID defines: drivers/media/radio/si470x/radio-si470x.h:57:0: warning: "CHIPID" redefined [enabled by default] drivers/media/radio/si470x/radio-si470x.h:57:0: warning: "CHIPID" redefined [enabled by default] drivers/media/radio/si470x/radio-si470x.h:57:0: warning: "CHIPID" redefined [enabled by default] So, use SI_foo namespace to avoid conflicts. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-06[media] radio-si470x-i2c: Pass the IRQF_ONESHOT flagFabio Estevam
Since commit 1c6c69525b40 ("genirq: Reject bogus threaded irq requests") threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. So pass the IRQF_ONESHOT flag in this case. The semantic patch that makes this change is available in scripts/coccinelle/misc/irqf_oneshot.cocci. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-30[media] wl128x: Allow compile test of GPIO consumers if !GPIOLIBGeert Uytterhoeven
The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer functionality only, can still be compiled if GPIOLIB is not enabled. Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where appropriate. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] radio: fix error return codeJulia Lawall
Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] si4713: fix error return codeJulia Lawall
Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] wl128x: fix int type for streg_cbdataMauro Carvalho Chehab
The streg_cbdata can have a negative error value. So, it should be an integer, and not u8, as reported by smatch: drivers/media/radio/wl128x/fmdrv_common.c:1517 fmc_prepare() warn: assigning (-115) to unsigned variable 'fmdev->streg_cbdata' Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] radio-si476x: Fix indentMauro Carvalho Chehab
As reported by smatch: drivers/media/radio/radio-si476x.c:571 si476x_radio_do_post_powerup_init() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08[media] media: radio-si4713: improve usage of gpiod APIUwe Kleine-König
Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Simplify accordingly. Moreover use the _optional variant which has tighter error checking, but is simpler to use which allows further simplification. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] wl128x: embed video_deviceHans Verkuil
Embed the video_device struct to simplify the error handling and in order to (eventually) get rid of video_device_alloc/release. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] wl128x-radio really depends on TI_STArnd Bergmann
All other drivers using the TI_ST infrastructure use 'depends on' for this symbol, and it makes no sense to only enable that if CONFIG_NET is enable, because the radio driver also depends on CONFIG_NET itself: ERROR: "skb_queue_purge" [drivers/media/radio/wl128x/fm_drv.ko] undefined! ERROR: "skb_push" [drivers/media/radio/wl128x/fm_drv.ko] undefined! ERROR: "skb_pull" [drivers/media/radio/wl128x/fm_drv.ko] undefined! Making the driver dependency explicit solves randconfig build problems and makes it more obvious to the reader. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-02[media] media: radio: handle timeoutsNicholas Mc Guire
Add handling for timeout case. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-02[media] media: radio: assign wait_for_completion_timeout to appropriately ↵Nicholas Mc Guire
typed var wait_for_completion_timeout() returns unsigned long not int. This assigns the return value to an appropriately typed variable (also helps keep static code checkers happy). Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-02[media] si470x: fixup wait_for_completion_timeout return handlingNicholas Mc Guire
return type of wait_for_completion_timeout is unsigned long not int. A appropriately named variable of type unsigned long is added and the assignments fixed up. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-02[media] radio/aimslab: use mdelay instead of udelayArnd Bergmann
Large udelay values are not allowed on the ARM architecture and result in a build error like ERROR: "__bad_udelay" [drivers/media/radio/radio-aimslab.ko] undefined! This changes the aimslab radio driver to use an equivalent mdelay statement. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-27[media] tea575x: split and export functionsOndrej Zary
Split ioctl interface from enum_freq_bands, g_tuner and s_hw_freq_seek functions and export them to be used in other drivers like bttv. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-27[media] media: radio: wl128x: fmdrv_rx.c: Remove unused functionRickard Strandqvist
Remove the function fm_rx_get_rds_system() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-14Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-12-02[media] media/radio: fix querycapHans Verkuil
Querycap should set the device_caps field. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14[media] si4713: add device tree supportSebastian Reichel
Add device tree support by changing the device registration order. In the device tree the si4713 node is a normal I2C device, which will be probed as such. Thus the V4L device must be probed from the I2C device and not the other way around. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14[media] si4713: use managed irq requestSebastian Reichel
Introduce the usage of managed irq request to simplify the code slightly. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14[media] si4713: use managed memory allocationSebastian Reichel
Introduce the usage of managed memory allocation to simplify the code slightly. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14[media] si4713: switch reset gpio to devm_gpiod APISebastian Reichel
This updates the driver to use the managed gpiod interface instead of the unmanged old GPIO API. This is a preperation for the introduction of device tree support. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> [hans.verkuil@cisco.com: fixed trivial compiler warning] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14[media] si4713: switch to devm regulator APISebastian Reichel
This switches back to the normal regulator API (but use managed variant) in preparation for device tree support. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> [hans.verkuil@cisco.com: fixed two trival compiler warnings] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03Merge branch 'platform/remove_owner' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next Remove all .owner fields from platform drivers
2014-10-24[media] wl128x: fix fmdbg compiler warningHans Verkuil
fmdrv_common.c: In function 'fm_download_firmware': fmdrv_common.c:1259:2: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat=] fmdbg("Firmware(%s) length : %d bytes\n", fw_name, fw_entry->size); ^ Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-20media: radio: si4713: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20media: radio: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-09Merge branch 'patchwork' into v4l_for_linusMauro Carvalho Chehab
* patchwork: (544 commits) [media] ir-hix5hd2: fix build on c6x arch [media] pt3: fix DTV FE I2C driver load error paths Revert "[media] media: em28xx - remove reset_resume interface" [media] exynos4-is: fix some warnings when compiling on arm64 [media] usb drivers: use %zu instead of %zd [media] pci drivers: use %zu instead of %zd [media] dvb-frontends: use %zu instead of %zd [media] s5p-mfc: Fix several printk warnings [media] s5p_mfc_opr: Fix warnings [media] ti-vpe: Fix typecast [media] s3c-camif: fix dma_addr_t printks [media] s5p_mfc_opr_v6: get rid of warnings when compiled with 64 bits [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64 [media] em28xx: Fix identation [media] drxd: remove a dead code [media] saa7146: remove return after BUG() [media] cx88: remove return after BUG() [media] cx88: fix cards table CodingStyle [media] radio-sf16fmr2: declare some structs as static [media] radio-sf16fmi: declare pnp_attached as static ... Conflicts: Documentation/DocBook/media/v4l/compat.xml
2014-09-26[media] radio-sf16fmr2: declare some structs as staticMauro Carvalho Chehab
drivers/media/radio/radio-sf16fmr2.c:308:19: warning: symbol 'fmr2_isa_driver' was not declared. Should it be static? drivers/media/radio/radio-sf16fmr2.c:316:19: warning: symbol 'fmr2_pnp_driver' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] radio-sf16fmi: declare pnp_attached as staticMauro Carvalho Chehab
drivers/media/radio/radio-sf16fmi.c:59:6: warning: symbol 'pnp_attached' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] media/radio: fix radio-miropcm20.c build with io.h header fileRandy Dunlap
Fix build errors in radio-miropcm20.c due to missing header file: drivers/media/radio/radio-miropcm20.c: In function 'rds_waitread': drivers/media/radio/radio-miropcm20.c:90:3: error: implicit declaration of function 'inb' [-Werror=implicit-function-declaration] drivers/media/radio/radio-miropcm20.c: In function 'rds_rawwrite': drivers/media/radio/radio-miropcm20.c:106:3: error: implicit declaration of function 'outb' [-Werror=implicit-function-declaration] Reported-by: Jim Davis <jim.epost@gmail.com> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-21[media] radio-si470x-usb: use USB API functions rather than constantsHimangi Saraogi
This patch introduces the use of the function usb_endpoint_is_int_in. The Coccinelle semantic patch that makes these changes is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) == - \(USB_DIR_IN\|0x80\)) + usb_endpoint_dir_in(epd) @@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) == - \(USB_ENDPOINT_XFER_INT\|3\)) + usb_endpoint_xfer_int(epd) @@ struct usb_endpoint_descriptor *epd; @@ - (usb_endpoint_xfer_int(epd) && usb_endpoint_dir_in(epd)) + usb_endpoint_is_int_in(epd) 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 <mchehab@osg.samsung.com>
2014-09-03[media] radio: use true/false for boolean varsMauro Carvalho Chehab
Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] wl128x: fix sparse warningsHans Verkuil
drivers/media/radio/wl128x/fmdrv_common.c:598:32: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:598:32: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:598:32: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:598:32: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:767:38: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:767:38: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:767:38: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:767:38: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:992:21: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:992:21: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:992:21: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:992:21: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:443:41: warning: incorrect type in assignment (different base types) drivers/media/radio/wl128x/fmdrv_common.c:1359:17: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:1359:17: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:1359:17: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:1359:17: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:1359:39: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:1359:39: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:1359:39: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:1359:39: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:1368:25: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:1368:25: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:1368:25: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:1368:25: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:1368:47: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:1368:47: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:1368:47: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_common.c:1368:47: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:119:20: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:119:20: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:119:20: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:119:20: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:192:20: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:192:20: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:192:20: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:192:20: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:288:28: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:288:28: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:288:28: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:288:28: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:534:20: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:534:20: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:534:20: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:534:20: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:625:17: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:625:17: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:625:17: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_rx.c:625:17: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_tx.c:377:20: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_tx.c:377:20: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_tx.c:377:20: warning: cast to restricted __be16 drivers/media/radio/wl128x/fmdrv_tx.c:377:20: warning: cast to restricted __be16 Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] radio-tea5764: fix sparse warningsHans Verkuil
drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16 drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16 drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16 drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16 drivers/media/radio/radio-tea5764.c:185:20: warning: incorrect type in assignment (different base types) drivers/media/radio/radio-tea5764.c:186:20: warning: incorrect type in assignment (different base types) drivers/media/radio/radio-tea5764.c:187:20: warning: incorrect type in assignment (different base types) drivers/media/radio/radio-tea5764.c:188:20: warning: incorrect type in assignment (different base types) drivers/media/radio/radio-tea5764.c:189:20: warning: incorrect type in assignment (different base types) Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30[media] radio-miropcm20: fix sparse NULL pointer warningWei Yongjun
Fixes the following sparse warnings: drivers/media/radio/radio-miropcm20.c:193:33: warning: Using plain integer as NULL pointer Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] radio-miropcm20: fix a compilation warningMauro Carvalho Chehab
drivers/media/radio/radio-miropcm20.c: In function 'sanitize': drivers/media/radio/radio-miropcm20.c:216:3: warning: comparison is always false due to limited range of data type [-Wtype-limits] if (p[i] < 32 || p[i] >= 128) { ^ As p is declared as a char array, it is signed. So, it can never be bigger than 127. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] radio-miropcm20: add RDS supportHans Verkuil
Once upon a time the radio-miropcm20 driver had RDS support. However, after some internal kernel changes that support was removed. Now that we have a nice RDS API I have been working on adding back this support. It has been tested with the si4713 RDS transmitter and it is working quite nicely. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] si4713: add the missing RDS functionalityHans Verkuil
Not all the RDS features of the si4713 were supported. Add the missing bits to fully support the hardware capabilities. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17[media] Fix 64-bit division fall-out from 64-bit control rangesHans Verkuil
Commit 0ba2aeb6dab80920edd9cf5b93b1ea4d6913b8f3 increased the internal control ranges to 64 bit, but that caused problems in drivers that use the minimum/maximum/step/default_value control values in a division or modulus operations since not all architectures support those natively. Luckily, in almost all cases it is possible to just cast to 32 bits (the control value is known to be 32 bits, so it is safe to cast). Only in v4l2-ctrls.c was it necessary to use do_div in one function. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17[media] v4l2-ctrls: use ptrs for all but the s32 typeHans Verkuil
Rather than having two unions for all types just keep 'val' and 'cur.val' and use the p_cur and p_new unions to access all others. The only reason for keeping 'val' and 'cur.val' is that it is used all over, so converting this as well would be a huge job. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04[media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIORamakrishnan Muthukrishnan
Since all the drivers that use `struct v4l2_fh' use the core priority checking, the setting of the flag in the drivers can be removed. Signed-off-by: Ramakrishnan Muthukrishnan <ramakrmu@cisco.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04[media] update reference, kerneltrap.org no longer worksPranith Kumar
kerneltrap.org no longer works, update to a working reference Signed-off-by: Pranith Kumar <bobby.prani@gmail.com> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-28[media] si4713: fix Kconfig dependenciesHans Verkuil
The SI4713 select should be I2C_SI4713 and the USB driver needs to depend on I2C as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Paul Bolle <pebolle@tiscali.nl> Reported-by: Richard Weinberger <richard@nod.at> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-28[media] radio-cadet: avoid interruptible_sleep_on raceHans Verkuil
interruptible_sleep_on is racy and going away. This replaces one use in the radio-cadet driver with a wait_event_interruptible call. Special care was taken that accesses to the rdsin and rdsout indices are always done with dev->lock held. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-24[media] radio-usb-si4713: make array of structs constHans Verkuil
The start_seq[] should be const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-04[media] radio-keene: Use module_usb_driverSachin Kamat
module_usb_driver eliminates the boilerplate and makes the code simpler. 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>
2014-01-15[media] radio-usb-si4713: fix sparse non static symbol warningsWei Yongjun
Fixes the following sparse warnings: drivers/media/radio/si4713/radio-usb-si4713.c:226:31: warning: symbol 'start_seq' was not declared. Should it be static? drivers/media/radio/si4713/radio-usb-si4713.c:291:29: warning: symbol 'command_table' was not declared. Should it be static? Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-13[media] tea575x: Fix build with ARCH=c6xMauro Carvalho Chehab
In file included from /devel/v4l/temp/include/asm-generic/page.h:23:0, from /devel/v4l/temp/arch/c6x/include/asm/page.h:9, from /devel/v4l/temp/include/asm-generic/io.h:14, from arch/c6x/include/generated/asm/io.h:1, from /devel/v4l/temp/drivers/media/radio/tea575x.c:23: /devel/v4l/temp/arch/c6x/include/asm/setup.h:17:27: error: unknown type name ‘phys_addr_t’ extern int c6x_add_memory(phys_addr_t start, unsigned long size); It seems that, on such arch, the includes from asm/ should be after the ones from linux/. The proper fix would be to patch the arch files, but, as this fix is trivial, apply it. Also, we generally put the asm includes after the linux ones, anyway. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-13[media] radio-usb-si4713: make si4713_register_i2c_adapter staticMauro Carvalho Chehab
This function isn't used nowhere outside the same .c file. Fixes this warning: drivers/media/radio/si4713/radio-usb-si4713.c:418:5: warning: no previous prototype for 'si4713_register_i2c_adapter' [-Wmissing-prototypes] int si4713_register_i2c_adapter(struct si4713_usb_device *radio) ^ Cc: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>