summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2013-03-23[media] drivers: staging: davinci_vpfe: use resource_size()Silviu-Mihai Popescu
This uses the resource_size() function instead of explicit computation. Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] bttv: apply mute settings on openFrank Schaefer
Previously, this has been done implicitly for video device nodes by calling set_input() (which calls audio_input() and also modified the mute setting). Since input and mute setting are now untangled (as much as possible), we need to apply the mute setting with an explicit call to audio_mute(). Also apply the mute setting when the radio device node gets opened. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] bttv: do not unmute the device before the first openFrank Schaefer
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] bttv: untangle audio input and mute settingFrank Schaefer
Split function audio_mux(): move the mute setting part to function audio_mute() and the input setting part to function audio_input(). Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] bttv: separate GPIO part from function audio_mux()Frank Schaefer
Move the GPIO part of function audio_mux() to a separate function audio_mux_gpio(). This prepares the code for the next patch which will separate mute and input setting. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] bttv: rename field 'audio' in struct 'bttv' to 'audio_input'Frank Schaefer
'audio_input' better describes the meaning of this field. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] bttv: do not save the audio input in audio_mux()Frank Schaefer
We can't and do not save the mute setting in function audio_mux(), so we should also not save the input in this function for consistency. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] bttv: audio_mux(): do not change the value of the v4l2 mute controlFrank Schaefer
There are cases where we want to call audio_mux() without changing the value of the v4l2 mute control, for example - mute mute on last close - mute on device probing Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] bttv: audio_mux(): use a local variable "gpio_mute" instead of ↵Frank Schaefer
modifying the function parameter "mute" Function audio_mux() actually deals with two types of mute: gpio mute and subdevice muting. This patch claryfies the meaning of these values, but mainly prepares the code for the next patch. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] davinci: vpfe: fix return value check in vpfe_enable_clock()Wei Yongjun
In case of error, the function clk_get() 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> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] rc-core: don't treat dev->rc_map.rc_type as a bitmapDavid Härdeman
store_protocols() treats dev->rc_map.rc_type as a bitmap which is wrong for two reasons. First of all, it is pretty bogus to change the protocol type of the keymap just because the hardware has been asked to decode a different protocol. Second, dev->rc_map.rc_type is an enum (i.e. a single protocol) as pointed out by James Hogan <james.hogan@imgtec.com>. Fix both issues by introducing a separate enabled_protocols member to struct rc_dev. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] dvb-usb/dw2102: Remove duplicate inclusion of ts2020.hSachin Kamat
ts2020.h was included twice. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] [PATH] enable dual tuner to Avermedia Twinstar in af9035 driverJose Alberto Reguero
This patch enable dual tuner for Avermedia Twinstar. Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] s5p-tv: remove the dv_preset API from hdmiphyHans Verkuil
The dv_preset API is deprecated and is replaced by the much improved dv_timings API. Remove the dv_preset support from this driver as this will allow us to remove the dv_preset API altogether (s5p-tv being the last user of this code). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] s5p-tv: remove the dv_preset API from hdmiHans Verkuil
The dv_preset API is deprecated and is replaced by the much improved dv_timings API. Remove the dv_preset support from this driver as this will allow us to remove the dv_preset API altogether (s5p-tv being the last user of this code). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] s5p-tv: remove dv_preset support from mixer_videoHans Verkuil
The dv_preset API is deprecated and is replaced by the much improved dv_timings API. Remove the dv_preset support from this driver as this will allow us to remove the dv_preset API altogether (s5p-tv being the last user of this code). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] s5p-tv: add dv_timings support for mixer_videoHans Verkuil
This just adds dv_timings support without modifying existing dv_preset support. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] s5p-tv: add dv_timings support for hdmiHans Verkuil
This just adds dv_timings support without modifying existing dv_preset support. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] s5p-tv: add dv_timings support for hdmiphyHans Verkuil
This just adds dv_timings support without modifying existing dv_preset support, although I had to refactor a little bit in order to share hdmiphy_find_conf() between the preset and timings code. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] gspca: remove needless check before usb_free_coherent()Wei Yongjun
usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] drxk_hard: Drop unused parameterJean Delvare
Last parameter of function GetLockStatus() isn't used so drop it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] davinci: vpif: Fix module build for capture and displayLad, Prabhakar
export the symbols which are used by two modules vpif_capture and vpif_display. renamed "ch_params" to "vpif_ch_params" so as to avoid name collision. This patch fixes following error: ERROR: "ch_params" [drivers/media/platform/davinci/vpif_display.ko] undefined! ERROR: "vpif_ch_params_count" [drivers/media/platform/davinci/vpif_display.ko] undefined! ERROR: "vpif_base" [drivers/media/platform/davinci/vpif_display.ko] undefined! ERROR: "ch_params" [drivers/media/platform/davinci/vpif_capture.ko] undefined! ERROR: "vpif_ch_params_count" [drivers/media/platform/davinci/vpif_capture.ko] undefined! ERROR: "vpif_base" [drivers/media/platform/davinci/vpif_capture.ko] undefined! make[1]: *** [__modpost] Error 1 Reported-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] drivers/staging/media/go7007: using strlcpy instead of strncpyChen Gang
for NUL terminated string, need always set 0 in the end. Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] media: radio: add module alias entry for radio-si4713Eduardo Valentin
Add MODULE_ALIAS entry for radio-si4713 platform driver. Signed-off-by: Eduardo Valentin <edubezval@gmail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] media: radio: add driver owner entry for radio-si4713Eduardo Valentin
Simple addition of platform_driver->driver->owner for radio-si4713. Signed-off-by: Eduardo Valentin <edubezval@gmail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] media: radio: correct module license (==> GPL v2)Eduardo Valentin
As per code header comment, changing the driver license entry to match the correct version. Signed-off-by: Eduardo Valentin <edubezval@gmail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] media: radio: CodingStyle changes on si4713Eduardo Valentin
Minor changes to make alignment match on open parenthesis. Signed-off-by: Eduardo Valentin <edubezval@gmail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] it913x: fix pid filterAntti Palosaari
I just made commit: "dvb_usb_v2: rework USB streaming logic" that breaks that driver PID filter. it913x driver checks use of PID filter directly from DVB USB v2 core internal variable "adap->pid_filtering" and stores it to own state. Calling order of .pid_filter_ctrl() and .pid_filter() was changed and due to that state was updated too late. Update state earlier. TODO: checking PID filter usage from DVB USB v2 is not very good idea as PID filter callbacks are called only when PID filter is enabled. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] dvb_usb_v2: rework USB streaming logicAntti Palosaari
Control flow order changed a little bit. HW PID filter is now disabled also when streaming is stopped - earlier it was just set only when streaming was started. Control flow is now: * set streaming status bit * submit USB streaming packets * enable HW PID filter * ask device to start streaming * N x add PID to device HW PID filter ... streaming video ... * N x remove PID from device HW PID filter * ask device to stop streaming * disable HW PID filter * kill USB streaming packets * clear streaming status bit Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] cypress_firmware: make checkpatch.pl happyAntti Palosaari
New checkpatch version likes to see strings not to split multiple lines even those are exceeding 80 line length. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] dvb_usb_v2: make checkpatch.pl happyAntti Palosaari
New checkpatch version likes to see strings not to split multiple lines even those are exceeding 80 line length. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] dvb_usb_v2: replace Kernel userspace lock with wait queueAntti Palosaari
There was sync mutex which was held over userspace. That is very wrong and could cause deadlock if different userspace process is used to "unlock". Wait queue seems to be correct solution for that kind of synchronizing issue so use it instead. lock debug gives following bug report: ================================================ [ BUG: lock held when returning to user space! ] 3.9.0-rc1+ #38 Tainted: G O ------------------------------------------------ tzap/4614 is leaving the kernel with locks still held! 1 lock held by tzap/4614: Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] dvb-usb/dvb-usb-v2: use IS_ENABLEDMauro Carvalho Chehab
Instead of checking everywhere there for 3 symbols, use instead IS_ENABLED macro. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] cx23885: use IS_ENABLEDMauro Carvalho Chehab
Instead of checking everywhere there for 3 symbols, use instead IS_ENABLED macro. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] tuners: use IS_ENABLEDMauro Carvalho Chehab
Instead of checking everywhere there for 3 symbols, use instead IS_ENABLED macro. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] dvb-frontends: use IS_ENABLEDMauro Carvalho Chehab
Instead of checking everywhere there for 3 symbols, use instead IS_ENABLED macro. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] hdpvr-video: Use the proper check for I2C supportMauro Carvalho Chehab
As reported by Geert Uytterhoeven <geert@linux-m68k.org>: drivers/media/usb/hdpvr/hdpvr-video.c: warning: "CONFIG_I2C_MODULE" is not defined [-Wundef] Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Thanks-to: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22[media] dvb_usb_v2: make local function dvb_usb_v2_generic_io() staticWei Yongjun
dvb_usb_v2_generic_io() was not declared. It should be static. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22[media] em28xx: tuner setup is broken after algo_data changeHans Verkuil
Commit aab3125c43d8fecc7134e5f1e729fabf4dd196da broke em28xx. I traced this eventually to the change in what algo_data points to. This pointer is also passed to em28xx_tuner_callback() through several hidden tuner layers (yuck!) and that callback was not updated. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22[media] em28xx: Only change I2C bus inside em28xx-i2cMauro Carvalho Chehab
There's currently a bug on em28xx-i2c that makes it write the wrong values to register 06, that controlls the I2C bus speed and bus. Fix it to change only the I2C bus flag. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22[media] m5602_ov7660: return error at ov7660_init()Mauro Carvalho Chehab
It used to be a code that returns arror at ov7660_init. However, this was removed by changeset c84e412f: @@ -231,33 +116,40 @@ int ov7660_init(struct sd *sd) if (dump_sensor) ov7660_dump_registers(sd); - err = ov7660_set_gain(&sd->gspca_dev, sensor_settings[GAIN_IDX]); - if (err < 0) - return err; + return 0; +} - err = ov7660_set_auto_white_balance(&sd->gspca_dev, - sensor_settings[AUTO_WHITE_BALANCE_IDX]); - if (err < 0) - return err; As complained by gcc: drivers/media/usb/gspca/m5602/m5602_ov7660.c: In function 'ov7660_init': drivers/media/usb/gspca/m5602/m5602_ov7660.c:99:9: warning: variable 'err' set but not used [-Wunused-but-set-variable] It should be noticed that the original error code was crappy, as it wasn't returning any error if sensor init fails. Fix it by returning an error if the sensor can't be initialized. Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22[media] siano: remove the ir protocol fieldMauro Carvalho Chehab
This field is unused. Remove it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22[media] drxk: fix CNR calculusMauro Carvalho Chehab
Changeset 8f3741e accidentally broke the CNR estimation. It should be calculated as "a + b - c". However, previously, the subtraction by c only occurred if SNR would be positive, due to a bad binding to DVBv3 API. This also fixes the following warning: drivers/media/dvb-frontends/drxk_hard.c:2556:6: warning: variable 'c' set but not used [-Wunused-but-set-variable] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22[media] siano: use do_div() for 64-bits divisionMauro Carvalho Chehab
As reported by Frank Schäfer <fschaefer.oss@googlemail.com>: ERROR: "__divdi3" [drivers/media/common/siano/smsdvb.ko] undefined! Reported-by: Frank Schäfer <fschaefer.oss@googlemail.com> Tested-by: Gianluca Gennari <gennarone@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9035: style changes for remote controller pollingAntti Palosaari
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9035: check I/O errors on IR pollingAntti Palosaari
Use more careful error checks. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: implement i/o optimized reg table writerAntti Palosaari
Use register address auto increment to reduce I/O when large register / values tables are written. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: sleep on attach()Antti Palosaari
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: move code from it913x to af9033Antti Palosaari
That register is property of demodulator so move it correct place. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] it913x: remove unused af9033 demod tuner config initsAntti Palosaari
Those are demodulator init tables according to used tuner tuner config. af9033 demod driver does those inits currently and due to that these duplicate inits could be removed. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>