summaryrefslogtreecommitdiffstats
path: root/drivers/media
Commit message (Collapse)AuthorAgeFilesLines
* [media] doc-rst: Fix conversion for dvb-core.rstMauro Carvalho Chehab2016-07-171-45/+45
| | | | | | | | | | | | | | | | | | The conversion from DocBook required some fixes: - Now, the C files with the exported symbols also need to be added. So, all headers need to be included twice: one to get the structs/enums/.. and another one for the functions; - Notes should use the ReST tag, as kernel-doc doesn't recognizes it anymore; - Identation needs to be fixed, as ReST uses it to identify when a format "tag" ends. - Fix the cross-references at the media controller description. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] doc-rst: Convert media API to rstMauro Carvalho Chehab2016-07-172-90/+8
| | | | | | | | | | | Move the contents of the media section at DocBooks/DocBook/device-drivers.tmpl to a new ReST book. For now, the contents is kept as-is. Next patches will fix the warnings and add cross-references that were removed due to the conversion. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* Merge branch 'topic/cec' into topic/docs-nextMauro Carvalho Chehab2016-07-0917-117/+1670
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * topic/cec: [media] DocBook/media: add CEC documentation [media] s5p_cec: get rid of an unused var [media] move s5p-cec to staging [media] vivid: add CEC emulation [media] cec: s5p-cec: Add s5p-cec driver [media] cec: adv7511: add cec support [media] cec: adv7842: add cec support [media] cec: adv7604: add cec support [media] cec: add compat32 ioctl support [media] cec/TODO: add TODO file so we know why this is still in staging [media] cec: add HDMI CEC framework (api) [media] cec: add HDMI CEC framework (adapter) [media] cec: add HDMI CEC framework (core) [media] cec-funcs.h: static inlines to pack/unpack CEC messages [media] cec.h: add cec header [media] cec-edid: add module for EDID CEC helper functions [media] cec.txt: add CEC framework documentation [media] rc: Add HDMI CEC protocol handling Input: add HDMI CEC specific keycodes Input: add BUS_CEC type
| * [media] move s5p-cec to stagingMauro Carvalho Chehab2016-06-288-727/+0
| | | | | | | | | | | | | | | | As the CEC core is currently at staging, it doesn't make any sense to put a dependent driver outside staging. So, move it also to staging. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
| * [media] vivid: add CEC emulationHans Verkuil2016-06-289-10/+478
| | | | | | | | | | | | | | | | | | | | | | The vivid driver has been extended to provide CEC adapters for the HDMI input and HDMI outputs in order to test CEC applications. This CEC emulation is faithful to the CEC timings (i.e., it all at a snail's pace). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
| * [media] cec: s5p-cec: Add s5p-cec driverKamil Debski2016-06-288-0/+727
| | | | | | | | | | | | | | | | | | | | | | | | | | Add CEC interface driver present in the Samsung Exynos range of SoCs. The following files were based on work by SangPil Moon: - exynos_hdmi_cec.h - exynos_hdmi_cecctl.c Signed-off-by: Kamil Debski <kamil@wypas.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
| * [media] cec: adv7511: add cec supportHans Verkuil2016-06-282-8/+401
| | | | | | | | | | | | | | | | | | | | | | Add CEC support to the adv7511 driver. Signed-off-by: Hans Verkuil <hansverk@cisco.com> [k.debski@samsung.com: Merged changes from CEC Updates commit by Hans Verkuil] Signed-off-by: Kamil Debski <kamil@wypas.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
| * [media] cec: adv7842: add cec supportHans Verkuil2016-06-282-63/+313
| | | | | | | | | | | | | | Add CEC support to the adv7842 driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
| * [media] cec: adv7604: add cec supportHans Verkuil2016-06-282-36/+304
| | | | | | | | | | | | | | | | | | | | | | | | Add CEC support to the adv7604 driver. Signed-off-by: Hans Verkuil <hansverk@cisco.com> [k.debski@samsung.com: Merged changes from CEC Updates commit by Hans Verkuil] [k.debski@samsung.com: add missing methods cec/io_write_and_or] [k.debski@samsung.com: change adv7604 to adv76xx in added functions] [hansverk@cisco.com: use _clr_set instead of _and_or] Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
| * [media] cec-edid: add module for EDID CEC helper functionsHans Verkuil2016-06-283-0/+173
| | | | | | | | | | | | | | | | | | | | The cec-edid module contains helper functions to find and manipulate the CEC physical address inside an EDID. Even if the CEC support itself is disabled, drivers will still need these functions. Which is the reason this is module is separate from the upcoming CEC framework. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
| * [media] rc: Add HDMI CEC protocol handlingKamil Debski2016-06-221-0/+1
| | | | | | | | | | | | | | | | | | Add handling of remote control events coming from the HDMI CEC bus and the new protocol required for that. Signed-off-by: Kamil Debski <kamil@wypas.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] media: rcar-vin: add DV timings supportUlrich Hecht2016-06-281-0/+82
| | | | | | | | | | | | | | | | | | Adds ioctls DV_TIMINGS_CAP, ENUM_DV_TIMINGS, G_DV_TIMINGS, S_DV_TIMINGS, and QUERY_DV_TIMINGS. Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] media: rcar_vin: Use correct pad number in try_fmtUlrich Hecht2016-06-281-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix rcar_vin_try_fmt's use of an inappropriate pad number when calling the subdev set_fmt function - for the ADV7612, IDs should be non-zero. Signed-off-by: William Towle <william.towle@codethink.co.uk> Reviewed-by: Rob Taylor <rob.taylor@codethink.co.uk> [ulrich.hecht+renesas@gmail.com: adapted to rcar-vin rewrite] Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] media: rcar-vin: pad-aware driver initialisationUlrich Hecht2016-06-282-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add detection of source pad number for drivers aware of the media controller API, so that rcar-vin can create device nodes to support modern drivers such as adv7604.c (for HDMI on Lager) and the converted adv7180.c (for composite) underneath. Building rcar_vin gains a dependency on CONFIG_MEDIA_CONTROLLER, in line with requirements for building the drivers associated with it. Signed-off-by: William Towle <william.towle@codethink.co.uk> Signed-off-by: Rob Taylor <rob.taylor@codethink.co.uk> [ulrich.hecht+renesas@gmail.com: adapted to rcar-vin rewrite] Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] radio-maxiradio: fix memory leak when device is removedAlexey Khoroshilov2016-06-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | Memory allocated for maxiradio device is not deallocated when the device is removed. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] stk1160: Check *nplanes in queue_setupHelen Fornazier2016-06-281-0/+3
| | | | | | | | | | | | | | | | If *nplanes is not zero, it should use the requested size if valid Signed-off-by: Helen Koike <helen.koike@collabora.co.uk> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] solo6x10: Simplify solo_enum_ext_inputIsmael Luceno2016-06-281-18/+16
| | | | | | | | | | | | | | | | Additionally, now it specifies which channels it's showing. Signed-off-by: Ismael Luceno <ismael@iodev.co.uk> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] adv7604: Don't ignore pad number in subdev DV timings pad operationsLaurent Pinchart2016-06-281-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dv_timings_cap() and enum_dv_timings() pad operations take a pad number as an input argument and return the DV timings capabilities and list of supported DV timings for that pad. Commit bd3e275f3ec0 ("[media] media: i2c: adv7604: Use v4l2-dv-timings helpers") broke this as it started ignoring the pad number, always returning the information associated with the currently selected input. Fix it. Fixes: bd3e275f3ec0 ("[media] media: i2c: adv7604: Use v4l2-dv-timings helpers") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] v4l: mt9v032: Add V4L2 controls for AEC and AGCMarkus Pargmann2016-06-281-58/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds V4L2 controls for Auto Exposure Control and Auto Gain Control settings. These settings include low pass filter, update frequency of these settings and the update interval for those units. [Avoid forward declarations] [Fix 80 columns limit violation] [Rename controls to avoid underscores in names] [Fix the AEC maximum shutter width on MT9V032] Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] v4l: mt9v032: Do not unset master_modeMarkus Pargmann2016-06-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The power_on function of the driver resets the chip and sets the CHIP_CONTROL register to 0. This switches the operating mode to slave. The s_stream function sets the correct mode. But this caused problems on a board where the camera chip is operated as master. The camera started after a random amount of time streaming an image, I observed between 10 and 300 seconds. The STRFM_OUT and STLN_OUT pins are not connected on this board which may cause some issues in slave mode. I could not find any documentation about this. Keeping the chip in master mode after the reset helped to fix this issue for me. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] v4l: mt9v032: Remove duplicate test for I2C_FUNC_SMBUS_WORD_DATA ↵Axel Lin2016-06-281-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functionality Since commit b42261078a91 ("regmap: i2c: fallback to SMBus if the adapter does not support standard I2C"), regmap-i2c will check the I2C_FUNC_SMBUS_[BYTE|WORD]_DATA functionality based on the regmap_config setting if the adapter does not support standard I2C. So remove the I2C_FUNC_SMBUS_WORD_DATA functionality check in the driver code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] v4l: mt9v032: Remove unneeded headerLaurent Pinchart2016-06-281-1/+0
| | | | | | | | | | | | | | | | The of_gpio.h header isn't needed, don't include it. Reported-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] v4l: mt9t001: fix clean up in case of power-on failuresGuennadi Liakhovetski2016-06-281-2/+13
| | | | | | | | | | | | | | | | | | If the driver fails to reset the camera or to set up control handlers, it has to power the camera back off. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] v4l: mt9t001: constify v4l2_subdev_internal_ops structureJulia Lawall2016-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | This v4l2_subdev_internal_ops structure is never modified. All other v4l2_subdev_internal_ops structures are declared as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] smiapp: Remove useless rval assignment in smiapp_get_pdata()Sakari Ailus2016-06-281-3/+1
| | | | | | | | | | | | | | | | The value is not used after the assignment. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] tw686x: be explicit about the possible dma_mode optionsHans Verkuil2016-06-281-1/+1
| | | | | | | | | | | | | | | | Users won't know what to put in this module option if it isn't described. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] tw686x: audio: Prevent hw param changes while busyEzequiel Garcia2016-06-282-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Audio hw params are shared across all DMA channels, so if the user changes any of these while any DMA channel is enabled, it will impact the enabled channels, potentially causing serious instability issues. This commit avoids such situation, by preventing any hw param change (on any DMA channel) if any other DMA audio channel is capturing. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] tw686x: audio: Allow to configure the period sizeEzequiel Garcia2016-06-283-23/+34
| | | | | | | | | | | | | | | | | | | | | | | | Currently, the driver has a fixed period size of 4096 bytes (2048 frames). Since this hardware can configure the audio capture size, this commit allows a period size range of [512-4096]. This is very useful to reduce the audio latency. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] tw686x: audio: Implement non-memcpy captureEzequiel Garcia2016-06-281-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we've introduced the dma_mode parameter to pick the DMA operation, let's use it to also select the audio DMA operation. When dma_mode != memcpy, the driver will avoid using memcpy in the audio capture path, and the DMA hardware operation will act directly on the ALSA buffers. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] tw686x: Add support for DMA scatter-gather modeEzequiel Garcia2016-06-284-0/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the driver has the infrastructure to support more DMA modes, let's add the DMA scatter-gather mode. In this mode, the device delivers sequential top-bottom frames. The scatter-gather logic is based on staging's tw686x-kh driver (by Krzysztof Ha?asa). Tested-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] tw686x: Add support for DMA contiguous interlaced frame modeEzequiel Garcia2016-06-284-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the driver has the infrastructure to support more DMA modes, let's add the DMA contiguous interlaced frame mode. In this mode, the DMA P and B buffers are programmed with the user-provided buffers. When a P (or B) frame is ready, a new buffer is dequeued into P (or B). In addition to interlaced fields, the device can also be programmed to deliver alternate fields. Only interlaced mode is supported for now. Tested-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] tw686x: Introduce an interface to support multiple DMA modesEzequiel Garcia2016-06-284-121/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's set the corner stone to support all the DMA modes available on this device. For stability reasons, the driver is currently setting DMA frame mode, and using single DMA buffers to get the P and B buffers. Each frame is then memcpy'ed into the user buffer. However, other platforms might be interested in avoiding this memcpy, or in taking advantage of the chip's DMA scatter-gather capabilities. To achieve this, this commit introduces a "dma_mode" module parameter, and a tw686x_dma_ops struct. This will allow to define functions to alloc/free DMA buffers, and to return the frames to userspace. The memcpy-based method described above is named as dma_mode="memcpy". Current alloc/free functions are renamed as tw686x_memcpy_xxx, and are now used through a memcpy_dma_ops. Tested-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | bdisp: move the V/H filter spec to bdisp-hw.cMauro Carvalho Chehab2016-06-242-304/+305
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those structs are used only at bdisp-hw, so they shouldn't be there in a header file that it is used elsewhere. This fixes the following Gcc 6.1 warnings: In file included from drivers/media/platform/sti/bdisp/bdisp-debug.c:11:0: drivers/media/platform/sti/bdisp/bdisp-filter.h:207:65: warning: ‘bdisp_v_spec’ defined but not used [-Wunused-const-variable=] static const struct __maybe_unused bdisp_filter_v_spec bdisp_v_spec[] = { ^~~~~~~~~ In file included from drivers/media/platform/sti/bdisp/bdisp-debug.c:11:0: drivers/media/platform/sti/bdisp/bdisp-filter.h:23:65: warning: ‘bdisp_h_spec’ defined but not used [-Wunused-const-variable=] static const struct __maybe_unused bdisp_filter_h_spec bdisp_h_spec[] = { ^~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | adv7842: comment out a table useful for debugMauro Carvalho Chehab2016-06-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Gcc 6.1 warns about an unused table: drivers/media/i2c/adv7842.c:2400:27: warning: 'prim_mode_txt' defined but not used [-Wunused-const-variable=] static const char * const prim_mode_txt[] = { ^~~~~~~~~~~~~ That seems to be useful for debug, and likely were used before. While we could simply remove, let's comment it out, for now. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | em28xx-dvb: remove some left overMauro Carvalho Chehab2016-06-241-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gcc 6.1 warns about an unused table: drivers/media/usb/em28xx/em28xx-dvb.c:907:38: warning: 'pctv_461e_m88ds3103_config' defined but not used [-Wunused-const-variable=] static const struct m88ds3103_config pctv_461e_m88ds3103_config = { ^~~~~~~~~~~~~~~~~~~~~~~~~~ That's a left over of patch 76b91be3d360a ('em28xx: PCTV 461e use I2C client for demod and SEC'). Remove the dead code. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | vivid: remove some unused varsMauro Carvalho Chehab2016-06-242-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | Gcc 6.1 warns about some unused vars. Remove them: drivers/media/platform/vivid/vivid-vid-cap.c:40:2: warning: 'tpf_default' defined but not used [-Wunused-const-variable=] tpf_default = {.numerator = 1, .denominator = 30}; ^~~~~~~~~~~ drivers/media/platform/vivid/vivid-sdr-cap.c:54:27: warning: 'NUM_FORMATS' defined but not used [-Wunused-const-variable=] static const unsigned int NUM_FORMATS = ARRAY_SIZE(formats); ^~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | zr36016: remove some unused tablesMauro Carvalho Chehab2016-06-241-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gcc 6.1 warns about some unused tables: drivers/media/pci/zoran/zr36016.c:251:18: warning: 'zr016_yoff' defined but not used [-Wunused-const-variable=] static const int zr016_yoff[] = { 8, 9, 7 }; ^~~~~~~~~~ drivers/media/pci/zoran/zr36016.c:250:18: warning: 'zr016_xoff' defined but not used [-Wunused-const-variable=] static const int zr016_xoff[] = { 20, 20, 20 }; ^~~~~~~~~~ Those tables aren't used anywere. So, remove them. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | r820t: comment out two ancillary tablesMauro Carvalho Chehab2016-06-241-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As Gcc6.1 warned, those tables are currently unused: drivers/media/tuners/r820t.c:349:18: warning: 'r820t_mixer_gain_steps' defined but not used [-Wunused-const-variable=] static const int r820t_mixer_gain_steps[] = { ^~~~~~~~~~~~~~~~~~~~~~ drivers/media/tuners/r820t.c:345:18: warning: 'r820t_lna_gain_steps' defined but not used [-Wunused-const-variable=] static const int r820t_lna_gain_steps[] = { ^~~~~~~~~~~~~~~~~~~~ They're actually used only by a routine that it is currently commented out. So, move those tables to be together with such code and comment them out. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | dib0090: comment out the unused tablesMauro Carvalho Chehab2016-06-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Those tables are currently unused, so comment them out: drivers/media/dvb-frontends/dib0090.c:852:18: warning: 'rf_ramp_pwm_sband' defined but not used [-Wunused-const-variable=] static const u16 rf_ramp_pwm_sband[] = { ^~~~~~~~~~~~~~~~~ drivers/media/dvb-frontends/dib0090.c:800:18: warning: 'bb_ramp_pwm_boost' defined but not used [-Wunused-const-variable=] static const u16 bb_ramp_pwm_boost[] = { ^~~~~~~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | drxj: comment out the unused nicam_presc_table_val tableMauro Carvalho Chehab2016-06-241-0/+3
| | | | | | | | | | | | | | | | | | | | Avoid this warning: drivers/media/dvb-frontends/drx39xyj/drxj.c:1243:18: warning: 'nicam_presc_table_val' defined but not used [-Wunused-const-variable=] static const u16 nicam_presc_table_val[43] = { ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | cx25821-alsa: shutup a Gcc 6.1 warningMauro Carvalho Chehab2016-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The PCI device ID table is only used if compiled with modules support. When compiled with modules disabled, this is now producing this bogus warning: drivers/media/pci/cx25821/cx25821-alsa.c:696:35: warning: 'cx25821_audio_pci_tbl' defined but not used [-Wunused-const-variable=] static const struct pci_device_id cx25821_audio_pci_tbl[] = { ^~~~~~~~~~~~~~~~~~~~~ Fix it by annotating that the function may not be used. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | m5602_ov7660: move skeletons to the .c fileMauro Carvalho Chehab2016-06-242-153/+153
| | | | | | | | | | | | | | | | The header file has some private static structures that are used only by the C file. Move those structures to the C file, in order to shut up gcc 6.1 warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | m5602_po1030: move skeletons to the .c fileMauro Carvalho Chehab2016-06-242-104/+104
| | | | | | | | | | | | | | | | The header file has some private static structures that are used only by the C file. Move those structures to the C file, in order to shut up gcc 6.1 warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | m5602_s5k83a: move skeletons to the .c fileMauro Carvalho Chehab2016-06-242-124/+124
| | | | | | | | | | | | | | | | The header file has some private static structures that are used only by the C file. Move those structures to the C file, in order to shut up gcc 6.1 warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | m5602_ov9650: move skeletons to the .c fileMauro Carvalho Chehab2016-06-242-150/+152
| | | | | | | | | | | | | | | | The header file has some private static structures that are used only by the C file. Move those structures to the C file, in order to shut up gcc 6.1 warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | m5602_mt9m111: move skeletons to the .c fileMauro Carvalho Chehab2016-06-242-144/+144
| | | | | | | | | | | | | | | | The header file has some private static structures that are used only by the C file. Move those structures to the C file, in order to shut up gcc 6.1 warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | m5602_s5k4aa: move skeletons to the .c fileMauro Carvalho Chehab2016-06-242-197/+199
| | | | | | | | | | | | | | | | The mc5602_s5k4aa.h has some private static structures that are used only by the C file. Move those structures to the C file, in order to shut up gcc 6.1 warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | m5602_core: move skeletons to the .c fileMauro Carvalho Chehab2016-06-242-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mc5602_brigde.h is included at m5602 submodules. This causes Gcc 6.1 to complain: drivers/media/usb/gspca/m5602/m5602_bridge.h:124:28: warning: 'sensor_urb_skeleton' defined but not used [-Wunused-const-variable=] static const unsigned char sensor_urb_skeleton[] = { ^~~~~~~~~~~~~~~~~~~ drivers/media/usb/gspca/m5602/m5602_bridge.h:119:28: warning: 'bridge_urb_skeleton' defined but not used [-Wunused-const-variable=] static const unsigned char bridge_urb_skeleton[] = { ^~~~~~~~~~~~~~~~~~~ Let's shut up gcc 6.1 warnings by moving those data structures to the core, as they're used only there. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | cx18: use macros instead of static const varsMauro Carvalho Chehab2016-06-245-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gcc 6.1 now complains about unused vars: drivers/media/pci/cx18/cx18-driver.h:497:18: warning: 'vbi_hblank_samples_50Hz' defined but not used [-Wunused-const-variable=] static const u32 vbi_hblank_samples_50Hz = 284; /* 4 byte EAV + 280 anc/fill */ ^~~~~~~~~~~~~~~~~~~~~~~ drivers/media/pci/cx18/cx18-driver.h:496:18: warning: 'vbi_hblank_samples_60Hz' defined but not used [-Wunused-const-variable=] static const u32 vbi_hblank_samples_60Hz = 272; /* 4 byte EAV + 268 anc/fill */ ^~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/media/pci/cx18/cx18-cards.c:25:0: drivers/media/pci/cx18/cx18-driver.h:497:18: warning: 'vbi_hblank_samples_50Hz' defined but not used [-Wunused-const-variable=] static const u32 vbi_hblank_samples_50Hz = 284; /* 4 byte EAV + 280 anc/fill */ ^~~~~~~~~~~~~~~~~~~~~~~ drivers/media/pci/cx18/cx18-driver.h:496:18: warning: 'vbi_hblank_samples_60Hz' defined but not used [-Wunused-const-variable=] static const u32 vbi_hblank_samples_60Hz = 272; /* 4 byte EAV + 268 anc/fill */ ^~~~~~~~~~~~~~~~~~~~~~~ drivers/media/pci/cx18/cx18-driver.h:495:18: warning: 'vbi_active_samples' defined but not used [-Wunused-const-variable=] static const u32 vbi_active_samples = 1444; /* 4 byte SAV + 720 Y + 720 U/V */ ^~~~~~~~~~~~~~~~~~ In this specific case, this is somewhat intentional, as those values are actually used in parts of the driver. The code assumes that gcc optimizer it and not actually create any var, but convert it to immediate access at the routines. Yet, as we want to shut up gcc warnings, let's use #define, with is the standard way to store values that will use assembler's immediate access code. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | exynos4-is: remove some unused varsMauro Carvalho Chehab2016-06-242-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Gcc 6.1 warns about some unused vars and functions. Remove them: drivers/media/platform/exynos4-is/mipi-csis.c:665:46: warning: 's5pcsis_sd_internal_ops' defined but not used [-Wunused-const-variable=] static const struct v4l2_subdev_internal_ops s5pcsis_sd_internal_ops = { ^~~~~~~~~~~~~~~~~~~~~~~ drivers/media/platform/exynos4-is/mipi-csis.c:652:12: warning: 's5pcsis_open' defined but not used [-Wunused-function] static int s5pcsis_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) ^~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
OpenPOWER on IntegriCloud