summaryrefslogtreecommitdiffstats
path: root/drivers/media
Commit message (Collapse)AuthorAgeFilesLines
* media: v4l: async: Correctly serialise async sub-device unregistrationSakari Ailus2017-10-311-11/+7Star
| | | | | | | | | | | | | | | The check whether an async sub-device is bound to a notifier was performed without list_lock held, making it possible for another process to unbind the async sub-device before the sub-device unregistration function proceeds to take the lock. Fix this by first acquiring the lock and then proceeding with the check. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: v4l: async: Fix notifier complete callback error handlingSakari Ailus2017-10-311-18/+60
| | | | | | | | | | | | | | | The notifier complete callback may return an error. This error code was simply returned to the caller but never handled properly. Move calling the complete callback function to the caller from v4l2_async_test_notify and undo the work that was done either in async sub-device or async notifier registration. Reported-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: v4l: async: fix unbind error in v4l2_async_notifier_unregister()Niklas Söderlund2017-10-311-4/+4
| | | | | | | | | | | | The call to v4l2_async_cleanup() will set sd->asd to NULL so passing it to notifier->unbind() has no effect and leaves the notifier confused. Call the unbind() callback prior to cleaning up the subdevice to avoid this. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: v4l: async: Don't set sd->dev NULL in v4l2_async_cleanupSakari Ailus2017-10-311-1/+0Star
| | | | | | | | | | | | v4l2_async_cleanup() is called when the async sub-device is unbound from the media device. As the pointer is set by the driver registering the async sub-device, leave the pointer as set by the driver. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: v4l: async: Remove re-probing supportSakari Ailus2017-10-311-53/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | Remove V4L2 async re-probing support. The re-probing support has been there to support cases where the sub-devices require resources provided by the main driver's hardware to function, such as clocks. Reprobing has allowed unbinding and again binding the main driver without explicitly unbinding the sub-device drivers. This is certainly not a common need, and the responsibility will be the user's going forward. An alternative could have been to introduce notifier specific locks. Considering the complexity of the re-probing and that it isn't really a solution to a problem but a workaround, remove re-probing instead. If there is a need to support the clock provider unregister/register cycle while keeping the clock references in the consumers in the future, this should be implemented in the clock framework instead, not in V4L2. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: ov9650: remove unnecessary terminated entry in menu items arrayAkinobu Mita2017-10-311-1/+0Star
| | | | | | | | | | | | | | | | | The test_pattern_menu[] array has two valid items and a null terminated item. So the control's maximum value which is passed to v4l2_ctrl_new_std_menu_items() should be one. However, 'ARRAY_SIZE(test_pattern_menu) - 1' is actually passed and it's not correct. Fix it by removing unnecessary terminated entry and let the correct control's maximum value be passed to v4l2_ctrl_new_std_menu_items(). Cc: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: ov5640: don't clear V4L2_SUBDEV_FL_IS_I2CAkinobu Mita2017-10-311-1/+1
| | | | | | | | | | | | | | | | | | The v4l2_i2c_subdev_init() sets V4L2_SUBDEV_FL_IS_I2C flag in the subdev->flags. But this driver overwrites subdev->flags immediately after calling v4l2_i2c_subdev_init(). So V4L2_SUBDEV_FL_IS_I2C is not set after all. This stops breaking subdev->flags and preserves V4L2_SUBDEV_FL_IS_I2C. Side note: According to the comment in v4l2_device_unregister(), this is problematic only if the device is platform bus device. Device tree or ACPI based devices are not affected. Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: ov2640: don't clear V4L2_SUBDEV_FL_IS_I2CAkinobu Mita2017-10-311-1/+1
| | | | | | | | | | | | | | | | | | The v4l2_i2c_subdev_init() sets V4L2_SUBDEV_FL_IS_I2C flag in the subdev->flags. But this driver overwrites subdev->flags immediately after calling v4l2_i2c_subdev_init(). So V4L2_SUBDEV_FL_IS_I2C is not set after all. This stops breaking subdev->flags and preserves V4L2_SUBDEV_FL_IS_I2C. Side note: According to the comment in v4l2_device_unregister(), this is problematic only if the device is platform bus device. Device tree or ACPI based devices are not affected. Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: max2175: don't clear V4L2_SUBDEV_FL_IS_I2CAkinobu Mita2017-10-311-1/+1
| | | | | | | | | | | | | | | | | | | The v4l2_i2c_subdev_init() sets V4L2_SUBDEV_FL_IS_I2C flag in the subdev->flags. But this driver overwrites subdev->flags immediately after calling v4l2_i2c_subdev_init(). So V4L2_SUBDEV_FL_IS_I2C is not set after all. This stops breaking subdev->flags and preserves V4L2_SUBDEV_FL_IS_I2C. Side note: According to the comment in v4l2_device_unregister(), this is problematic only if the device is platform bus device. Device tree or ACPI based devices are not affected. Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: adv7180: don't clear V4L2_SUBDEV_FL_IS_I2CAkinobu Mita2017-10-311-1/+1
| | | | | | | | | | | | | | | | | | | The v4l2_i2c_subdev_init() sets V4L2_SUBDEV_FL_IS_I2C flag in the subdev->flags. But this driver overwrites subdev->flags immediately after calling v4l2_i2c_subdev_init(). So V4L2_SUBDEV_FL_IS_I2C is not set after all. This stops breaking subdev->flags and preserves V4L2_SUBDEV_FL_IS_I2C. Side note: According to the comment in v4l2_device_unregister(), this is problematic only if the device is platform bus device. Device tree or ACPI based devices are not affected. Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: st-hva: hva-h264: use swap macro in hva_h264_encodeGustavo A. R. Silva2017-10-311-4/+1Star
| | | | | | | | | | | Make use of the swap macro and remove unnecessary variable tmp_frame. This makes the code easier to read and maintain. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: atmel-isc: Fix clock ID for clk_prepare/unprepareWenyou Yang2017-10-311-4/+4
| | | | | | | | | | Fix the clock ID to do the runtime pm should be ISC_ISPCK, instead of ISC_MCK in clk_prepare(), clk_unprepare() and isc_clk_is_enabled(). Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: bdisp: remove redundant assignment to pixColin Ian King2017-10-311-1/+1
| | | | | | | | | | | | | Pointer pix is being initialized to a value and a little later being assigned the same value again. Remove the initial assignment to avoid a duplicate assignment. Cleans up the clang warning: drivers/media/platform/sti/bdisp/bdisp-v4l2.c:726:26: warning: Value stored to 'pix' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: gspca: remove redundant assignment to variable jColin Ian King2017-10-311-1/+0Star
| | | | | | | | | | | | | | Variable j is being set to zero before a loop and also immediately inside the loop and is not used after the loop. Hence the first assignment is redundant and can be removed. Cleans up clang warning: drivers/media/usb/gspca/gspca.c:1078:2: warning: Value stored to 'j' is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: mxl111sf: remove redundant assignment to indexColin Ian King2017-10-311-1/+0Star
| | | | | | | | | | | | | | Variable index is set to zero and then set to zero again a few lines later in a for loop initialization. Remove the redundant setting of index to zero. Cleans up the clang warning: drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c:519:3: warning: Value stored to 'index' is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: camss-video.c: drop unused headerHans Verkuil2017-10-311-1/+0Star
| | | | | | | Drop unused vb1 header. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: radio-raremono: remove redundant initialization of freqColin Ian King2017-10-311-1/+1
| | | | | | | | | | | | | | Variable freq is initialized to f->frequency however this value is never read and freq is later updated; hence the initialization is redundant and can be removed. Cleans up clang warning: drivers/media/radio/radio-raremono.c:257:6: warning: Value stored to 'freq' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: usbtv: fix brightness and contrast controlsAdam Sampson2017-10-311-2/+2
| | | | | | | | | | | | | | | | | | | | Because the brightness and contrast controls share a register, usbtv_s_ctrl needs to read the existing values for both controls before inserting the new value. However, the code accidentally wrote to the registers (from an uninitialised stack array), rather than reading them. The user-visible effect of this was that adjusting the brightness would also set the contrast to a random value, and vice versa -- so it wasn't possible to correctly adjust the brightness of usbtv's video output. Tested with an "EasyDAY" UTV007 device. Fixes: c53a846c48f2 ("usbtv: add video controls") Signed-off-by: Adam Sampson <ats@offog.org> Reviewed-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: s2255: Convert timers to use timer_setup()Kees Cook2017-10-311-3/+4
| | | | | | | | | | | | | | | | In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Bhumika Goyal <bhumirks@gmail.com> Cc: Mike Isely <isely@pobox.com> Cc: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: radio: Convert timers to use timer_setup()Kees Cook2017-10-312-8/+6Star
| | | | | | | | | | | | | | In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Hans Verkuil <hverkuil@xs4all.nl> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: pci: Convert timers to use timer_setup()Kees Cook2017-10-3111-29/+28Star
| | | | | | | | | | | | | | | | | | | In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Andy Walls <awalls@md.metrocast.net> Cc: Sergey Kozlov <serjk@netup.ru> Cc: Abylay Ospan <aospan@netup.ru> Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Cc: Arvind Yadav <arvind.yadav.cs@gmail.com> Cc: Geliang Tang <geliangtang@gmail.com> Cc: Sean Young <sean@mess.org> Cc: "Pali Rohár" <pali.rohar@gmail.com> Signed-off-by: Kees Cook <keescook@chromium.org> [hans.verkuil@cisco.com: dropped pci/ttpci/av7110_ir.c patch chunk] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: tegra-cec: fix messy probe() cleanupHans Verkuil2017-10-311-16/+10Star
| | | | | | | | | | | | | | The probe() cleanup code ('goto foo_error') was very messy. It appears that this code wasn't updated when I switched to the devm_ functions in an earlier version. Update the code to use 'return error' where it can and do proper cleanup where it needs to. Note that the original code wasn't buggy, it was just messy. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: usb: usbtv: remove duplicate & operationJaejoong Kim2017-10-311-1/+1
| | | | | | | | | | usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7ff. Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: rockchip/rga: annotate PM functions as __maybe_unusedArnd Bergmann2017-10-311-4/+2Star
| | | | | | | | | | | | | | | | | | | | | The newly added driver has incorrect #ifdef annotations on its PM functions, leading to a harmless compile-time warning when CONFIG_PM is disabled: drivers/media/platform/rockchip/rga/rga.c:760:13: error: 'rga_disable_clocks' defined but not used [-Werror=unused-function] static void rga_disable_clocks(struct rockchip_rga *rga) ^~~~~~~~~~~~~~~~~~ drivers/media/platform/rockchip/rga/rga.c:728:12: error: 'rga_enable_clocks' defined but not used [-Werror=unused-function] This removes the #ifdef and marks the functions as __maybe_unused, so gcc can silently drop all the unused code. Fixes: f7e7b48e6d79 ("[media] rockchip/rga: v4l2 m2m support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: cec-pin: use IS_ERR instead of PTR_ERR_OR_ZEROHans Verkuil2017-10-311-1/+1
| | | | | | | | cec_allocate_adapter never returns NULL, so just use IS_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: v4l2-ctrl: Fix flags field on Control eventsRicardo Ribalda2017-10-311-4/+12
| | | | | | | | | | | | | | | | VIDIOC_DQEVENT and VIDIOC_QUERY_EXT_CTRL should give the same output for the control flags field. This patch creates a new function user_flags(), that calculates the user exported flags value (which is different than the kernel internal flags structure). This function is then used by all the code that exports the internal flags to userspace. Reported-by: Dimitrios Katsaros <patcherwork@gmail.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: <stable@vger.kernel.org> # for v3.17 and up Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: davinci: make ccdc_hw_device structures constBhumika Goyal2017-10-313-3/+3
| | | | | | | | | | | | Make these structures const as they are only getting passed to the functions vpfe_{register/unregister}_ccdc_device having the argument as const. Structures found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: davinci: make function arguments constBhumika Goyal2017-10-312-5/+5
| | | | | | | | | | | Make the function arguments of functions vpfe_{register/unregister}_ccdc_device const as the pointer dev does not modify the fields of the structure it points to. Also, declare the variable ccdc_dev const as it points to the same structure as dev but it does not modify the fields as well. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: saa7134: Convert timers to use timer_setup()Kees Cook2017-10-316-15/+11Star
| | | | | | | | | | | In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: tvaudio: Convert timers to use timer_setup()Kees Cook2017-10-311-5/+3Star
| | | | | | | | | | In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: dvb-core: Convert timers to use timer_setup()Kees Cook2017-10-311-5/+3Star
| | | | | | | | | | | In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: devendra sharma <devendra.sharma9091@gmail.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: saa7146: Convert timers to use timer_setup()Kees Cook2017-10-313-6/+4Star
| | | | | | | | | | In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: tc358743: Convert timers to use timer_setup()Kees Cook2017-10-311-4/+3Star
| | | | | | | | | | | In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Mats Randgaard <matrandg@cisco.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: media/saa7146: Convert timers to use timer_setup()Kees Cook2017-10-312-5/+6
| | | | | | | | | | | | In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This requires adding a pointer to hold the timer's target file, as there won't be a way to pass this in the future. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: radio-si470x: make si470x_viddev_template constBhumika Goyal2017-10-312-2/+2
| | | | | | | | | | | Make this const as it is only used in a copy operation in the files referencing it. Add const to declaration in the header too. Structure found using Coccienlle and changes done by hand. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: cx231xx: make cx231xx_vbi_qops constBhumika Goyal2017-10-312-2/+2
| | | | | | | | | | | | Make this const as it is only passed to the const argument of the function videobuf_queue_vmalloc_init in the file referencing it. Also, make the declaration in the header const. Structure found using Coccienlle and changes done by hand. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: omap_vout: Fix a possible null pointer dereference in omap_vout_open()Markus Elfring2017-10-311-1/+2
| | | | | | | | | | | Move a debug message so that a null pointer access can not happen for the variable "vout" in this function. Fixes: 5c7ab6348e7b3fcca2b8ee548306c774472971e2 ("V4L/DVB: V4L2: Add support for OMAP2/3 V4L2 display driver on top of DSS2") Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: cx231xx: Fix NTSC/PAL on Astrometa T2hybridOleh Kravchenko2017-10-311-0/+1
| | | | | | Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: cx231xx: Fix NTSC/PAL on Evromedia USB Full Hybrid Full HDOleh Kravchenko2017-10-311-0/+1
| | | | | | Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: rc: mceusb: add support for 15f4:0135Oleh Kravchenko2017-10-311-0/+9
| | | | | | | | Astrometa T2hybrid (15f4:0135) has IR on Interface 0. Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: rc: Add Astrometa T2hybrid keymap moduleOleh Kravchenko2017-10-312-0/+71
| | | | | | | | Add the keymap module for Astrometa T2hybrid remote control commands. Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: rc: mceusb: add support for 1b80:d3b2Oleh Kravchenko2017-10-312-1/+9
| | | | | | | | | | Evromedia USB Full Hybrid Full HD (1b80:d3b2) has IR on Interface 0. Remote controller supplied with this tuner fully compatible with RC_MAP_MSI_DIGIVOX_III. Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: rc: Convert timers to use timer_setup()Kees Cook2017-10-319-35/+30Star
| | | | | | | | | | | | | | | | | In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Maxim Levitsky <maximlevitsky@gmail.com> Cc: James Hogan <jhogan@kernel.org> Cc: Hans Verkuil <hans.verkuil@cisco.com> Cc: "Antti Seppälä" <a.seppala@gmail.com> Cc: Heiner Kallweit <hkallweit1@gmail.com> Cc: "David Härdeman" <david@hardeman.nu> Cc: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: atmel-isc: get rid of an unused varMauro Carvalho Chehab2017-10-311-3/+0Star
| | | | | | | | | drivers/media/platform/atmel/atmel-isc.c: In function 'isc_async_complete': drivers/media/platform/atmel/atmel-isc.c:1900:28: warning: variable 'sd_entity' set but not used [-Wunused-but-set-variable] struct isc_subdev_entity *sd_entity; ^~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: rc/keymaps: add support for RC of hisilicon poplar boardYounian Wang2017-10-272-0/+70
| | | | | | | | | | This is a NEC protocol type remote controller distributed with 96boards poplar@tocoding board. Signed-off-by: Younian Wang <wangyounian@hisilicon.com> Signed-off-by: Jiancheng Xue <xuejiancheng@hisilicon.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: rc/keymaps: add support for RC of hisilicon TV demo boardsYounian Wang2017-10-272-0/+82
| | | | | | | | | | This is a NEC protocol type remote controller distributed with hisilicon TV demo boards. Signed-off-by: Younian Wang <wangyounian@hisilicon.com> Signed-off-by: Jiancheng Xue <xuejiancheng@hisilicon.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: serial_ir: Convert timers to use timer_setup()Kees Cook2017-10-271-3/+2Star
| | | | | | | | | | | In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: imon: Fix null-ptr-deref in imon_probeArvind Yadav2017-10-271-0/+5
| | | | | | | | | | It seems that the return value of usb_ifnum_to_if() can be NULL and needs to be checked. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Tested-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: tc358743: validate lane countPhilipp Zabel2017-10-271-0/+5
| | | | | | | | | The TC358743 does not support more than 4 data lanes. Check that the lane count is valid. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* media: i2c: OV5647: change to use macro for the registersJacob Chen2017-10-271-16/+26
| | | | | | | | | | ref docuemnt: ov5647-datasheet-v1.00-2009 Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com> Reviewed-by: Luis Oliveira <lolivei@synopsys.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>