Julia Lawall [Tue, 8 Aug 2017 10:58:27 +0000 (06:58 -0400)]
media: v4l: mt9t001: constify video_subdev structures
The v4l2_subdev_ops structure is only passed as the third argument of
v4l2_i2c_subdev_init, which is const, so the v4l2_subdev_ops structure
can be const as well. The other structures are only stored in the
v4l2_subdev_ops structure, all the fields of which are const, so these
structures can also be const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Chiranjeevi Rapolu [Wed, 9 Aug 2017 21:59:48 +0000 (17:59 -0400)]
media: ov5670: Fix incorrect frame timing reported to user
Previously, pixel-rate/(pixels-per-line * lines-per-frame) was
yielding incorrect frame timing for the user.
OV sensor is using internal timing and this requires
conversion (internal timing -> PPL) for correct HBLANK calculation.
Now, change pixels-per-line domain from internal sensor clock to
pixels domain. Set HBLANK read-only because fixed PPL is used for all
resolutions. And, use more accurate link-frequency 422.4MHz instead of
rounding down to 420MHz.
Signed-off-by: Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Thu, 17 Aug 2017 11:56:24 +0000 (07:56 -0400)]
media: usb: rainshadow-cec: constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Thu, 17 Aug 2017 11:56:23 +0000 (07:56 -0400)]
media: usb: pulse8-cec: constify serio_device_id
serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Fabio Estevam [Thu, 17 Aug 2017 00:14:07 +0000 (20:14 -0400)]
media: coda/imx-vdoa: Check for platform_get_resource() error
platform_get_resource() may fail and in this case a NULL dereference
will occur.
Prevent this from happening by returning an error on
platform_get_resource() failure.
Fixes:
b0444f18e0b18abce ("[media] coda: add i.MX6 VDOA driver")
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Bhumika Goyal [Wed, 16 Aug 2017 15:37:42 +0000 (11:37 -0400)]
media: ivtv: Fix incompatible type for argument error
The first argument of function snd_ctl_new1 is of type const struct
snd_kcontrol_new * but in this file the variable is passed by value
to this function. This generated ""incompatible type for argument"
error. So, pass the variable by reference.
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>
Bhumika Goyal [Wed, 16 Aug 2017 14:54:00 +0000 (10:54 -0400)]
media: cx18: Fix incompatible type for argument error
The first argument of function snd_ctl_new1 is of type const struct
snd_kcontrol_new * but in this file the variable is passed by value to
this function.
This generated ""incompatible type for argument" error. So, pass the
variable by reference.
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>
Bhumika Goyal [Wed, 16 Aug 2017 09:17:05 +0000 (05:17 -0400)]
media: solo6x10: make snd_kcontrol_new const
Make this const as it is only used during a copy operation.
Done using Coccinelle.
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>
Bhumika Goyal [Wed, 16 Aug 2017 09:17:04 +0000 (05:17 -0400)]
media: cx88: make snd_kcontrol_new const
Make this const as it only passed as the 1st argument to the function
snd_ctl_new1, which is of type const.
Done using Coccinelle.
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>
Arvind Yadav [Wed, 16 Aug 2017 05:30:10 +0000 (01:30 -0400)]
media: radio: constify pnp_device_id
pnp_device_id are not supposed to change at runtime. All functions
working with pnp_device_id provided by <linux/pnp.h> work with
const pnp_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 15 Aug 2017 11:23:41 +0000 (07:23 -0400)]
media: davinci: constify platform_device_id
platform_device_id are not supposed to change at runtime. All functions
working with platform_device_id provided by <linux/platform_device.h>
work with const platform_device_id. So mark the non-const structs as
const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Tue, 15 Aug 2017 11:23:40 +0000 (07:23 -0400)]
media: coda: constify platform_device_id
platform_device_id are not supposed to change at runtime. All functions
working with platform_device_id provided by <linux/platform_device.h>
work with const platform_device_id. So mark the non-const structs as
const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Bhumika Goyal [Sun, 13 Aug 2017 12:43:12 +0000 (08:43 -0400)]
media: staging: bcm2835-audio: make snd_pcm_hardware const
Make these const as they are only used during a copy operation.
Done using Coccinelle.
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>
Pan Bian [Tue, 8 Aug 2017 14:49:58 +0000 (10:49 -0400)]
media: mtk-mdp: use IS_ERR to check return value of of_clk_get
Function of_clk_get() returns an ERR_PTR on failures. In file
mtk_mdp_commp.c, its return value is checked against NULL. Such checks
cannot prevent from accessing bad memory. This patch replaces the NULL
checks with IS_ERR checks.
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Rob Herring [Fri, 21 Jul 2017 19:28:33 +0000 (15:28 -0400)]
media: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Songjun Wu <songjun.wu@microchip.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
Cc: Houlong Wei <houlong.wei@mediatek.com>
Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Hyun Kwon <hyun.kwon@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-renesas-soc@vger.kernel.org
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Sakari Ailus [Tue, 15 Aug 2017 10:14:23 +0000 (06:14 -0400)]
media: omap3isp: Quit using struct v4l2_subdev.host_priv field
struct v4l2_subdev.host_priv is intended to be used by another driver. This
is hardly good design but back in the days of platform data was a quick
hack to get things done.
As the sub-device specific bus information can be stored to the ISP driver
specific struct allocated along with v4l2_async_subdev, keep the
information there and only there.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Sakari Ailus [Sat, 4 Mar 2017 09:52:40 +0000 (04:52 -0500)]
media: omap3isp: csiphy: Don't assume the CSI receiver is a CSI2 module
The CSI PHY is associated with a CSI receiver. The code assumes this
receiver is a CSI2 module and relies on the CSI2 module object heavily to
access the ISP or pipeline objects. However, the receiver could also be a
CSI1/CCP2 module.
Pass a new CSI receiver entity pointer to the CSI PHY acquire function, and
replace all hardcoded usage of the CSI2 module with that CSI receiver
entity.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # on Beagleboard-xM + MPT9P031
Acked-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Sakari Ailus [Sat, 4 Mar 2017 09:55:48 +0000 (04:55 -0500)]
media: omap3isp: Always initialise isp and mutex for csiphy1
The PHY is still relevant for CCP2.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # on Beagleboard-xM + MPT9P031
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Pavel Machek [Wed, 1 Mar 2017 11:45:46 +0000 (06:45 -0500)]
media: omap3isp: Correctly set IO_OUT_SEL and VP_CLK_POL for CCP2 mode
ISP CSI1 module needs all the bits correctly set to work.
Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # on Beagleboard-xM + MPT9P031
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Pavel Machek [Tue, 28 Feb 2017 11:38:16 +0000 (06:38 -0500)]
media: omap3isp: Parse CSI1 configuration from the device tree
Add support for parsing CSI1 configuration.
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # on Beagleboard-xM + MPT9P031
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Wed, 16 Aug 2017 07:13:02 +0000 (03:13 -0400)]
media: cec-pin: fix irq handling
The free_irq() function could be called from interrupt context,
which is invalid. Move this to the thread.
In the interrupt handler we just request that the thread disables
the irq. This is done through an atomic so we don't need to add
any spinlocks.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Tue, 15 Aug 2017 19:26:25 +0000 (15:26 -0400)]
media: cec: rename pin events/function
The CEC_EVENT_PIN_LOW/HIGH defines and the cec_queue_pin_event() function
did not specify that these were about CEC pin events.
Since in the future there will also be HPD pin events it is wise to rename
the event defines and function to CEC_EVENT_PIN_CEC_LOW/HIGH and
cec_queue_pin_cec_event() now before these become part of the ABI.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Fri, 4 Aug 2017 10:41:53 +0000 (06:41 -0400)]
media: s5p-cec: use CEC_CAP_DEFAULTS
Use the new CEC_CAP_DEFAULTS define in the s5p-cec driver.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Hans Verkuil [Fri, 4 Aug 2017 11:25:06 +0000 (07:25 -0400)]
media: v4l2-compat-ioctl32.c: add capabilities field to, v4l2_input32
The v4l2_input32 struct wasn't updated when this field was added.
It didn't cause a failure in the compat code, but it is better to
keep it in sync with v4l2_input to avoid confusion.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Mauro Carvalho Chehab [Sat, 12 Aug 2017 09:57:05 +0000 (05:57 -0400)]
media: v4l2-ctrls.h: better document the arguments for v4l2_ctrl_fill
The arguments for this function are pointers. Make it clear at
its documentation.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Tue, 8 Aug 2017 12:56:24 +0000 (08:56 -0400)]
media: uvcvideo: Constify video_subdev structures
uvc_subdev_ops is only passed as the second argument of
v4l2_subdev_init, which is const, so uvc_subdev_ops can be
const as well.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Guennadi Liakhovetski [Tue, 8 Aug 2017 12:56:23 +0000 (08:56 -0400)]
media: uvcvideo: Convert from using an atomic variable to a reference count
When adding support for metadata nodes, we'll have to keep video
devices registered until all metadata nodes are closed too. Since
this has nothing to do with stream counting, replace the nstreams
atomic variable with a reference counter.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Guennadi Liakhovetski [Tue, 8 Aug 2017 12:56:22 +0000 (08:56 -0400)]
media: uvcvideo: Fix .queue_setup() to check the number of planes
According to documentation of struct vb2_ops the .queue_setup() callback
should return an error if the number of planes parameter contains an
invalid value on input. Fix this instead of ignoring the value.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Guenter Roeck [Tue, 8 Aug 2017 12:56:21 +0000 (08:56 -0400)]
media: uvcvideo: Prevent heap overflow when accessing mapped controls
The size of uvc_control_mapping is user controlled leading to a
potential heap overflow in the uvc driver. This adds a check to verify
the user provided size fits within the bounds of the defined buffer
size.
Originally-from: Richard Simmons <rssimmo@amazon.com>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Jim Lin [Tue, 8 Aug 2017 12:56:20 +0000 (08:56 -0400)]
media: uvcvideo: Fix incorrect timeout for Get Request
Section 9.2.6.4 of USB 2.0/3.x specification describes that
"device must be able to return the first data packet to host within
500 ms of receipt of the request. For subsequent data packet, if any,
the device must be able to return them within 500 ms".
This is to fix incorrect timeout and change it from 300 ms to 500 ms
to meet the timing specified by specification for Get Request.
Signed-off-by: Jim Lin <jilin@nvidia.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Fri, 4 Aug 2017 12:09:48 +0000 (08:09 -0400)]
media: zr364xx: constify videobuf_queue_ops structures
These videobuf_queue_ops structures are only passed as the second
argument to videobuf_queue_vmalloc_init, which is declared as const.
Thus the videobuf_queue_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct videobuf_queue_ops i@p = { ... };
@ok1@
identifier r.i;
expression e1;
position p;
@@
videobuf_queue_vmalloc_init(e1,&i@p,...)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct videobuf_queue_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct videobuf_queue_ops i = { ... };
// </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@s-opensource.com>
Julia Lawall [Fri, 4 Aug 2017 12:09:47 +0000 (08:09 -0400)]
media: tm6000: constify videobuf_queue_ops structures
These videobuf_queue_ops structures are only passed as the second
argument to videobuf_queue_vmalloc_init, which is declared as const.
Thus the videobuf_queue_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct videobuf_queue_ops i@p = { ... };
@ok1@
identifier r.i;
expression e1;
position p;
@@
videobuf_queue_vmalloc_init(e1,&i@p,...)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct videobuf_queue_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct videobuf_queue_ops i = { ... };
// </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@s-opensource.com>
Julia Lawall [Fri, 4 Aug 2017 12:09:46 +0000 (08:09 -0400)]
media: cx231xx: constify videobuf_queue_ops structures
These videobuf_queue_ops structures are only passed as the second
argument to videobuf_queue_vmalloc_init, which is declared as const.
Thus the videobuf_queue_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct videobuf_queue_ops i@p = { ... };
@ok1@
identifier r.i;
expression e1;
position p;
@@
videobuf_queue_vmalloc_init(e1,&i@p,...)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct videobuf_queue_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct videobuf_queue_ops i = { ... };
// </smpl>
In the first case, there is a second commented call to
videobuf_queue_sg_init with the structure as the second argument. If that
code will be uncommented, the const will remain correct, because the second
parameter of that function is also const.
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@s-opensource.com>
Julia Lawall [Fri, 4 Aug 2017 12:09:44 +0000 (08:09 -0400)]
media: cx18: constify videobuf_queue_ops structures
These videobuf_queue_ops structures are only passed as the second
argument to videobuf_queue_vmalloc_init, which is declared as const.
Thus the videobuf_queue_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct videobuf_queue_ops i@p = { ... };
@ok1@
identifier r.i;
expression e1;
position p;
@@
videobuf_queue_vmalloc_init(e1,&i@p,...)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct videobuf_queue_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct videobuf_queue_ops i = { ... };
// </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@s-opensource.com>
Julia Lawall [Mon, 14 Aug 2017 05:58:37 +0000 (01:58 -0400)]
media: pxa_camera: constify v4l2_clk_ops structure
This v4l2_clk_ops structure is only passed as the first argument of
v4l2_clk_register, which is const, so the v4l2_clk_ops structure can
also be const.
Done with the help of Coccinelle.
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@s-opensource.com>
Julia Lawall [Mon, 14 Aug 2017 05:43:56 +0000 (01:43 -0400)]
media: v4l2: av7110_v4l: constify v4l2_audio structure
This v4l2_audio structure is only copied into other structures,
so it can be const.
Done with the help of Coccinelle.
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@s-opensource.com>
Bhumika Goyal [Sun, 13 Aug 2017 12:43:13 +0000 (08:43 -0400)]
media: tuners: make snd_pcm_hardware const
Make these const as they are only used during a copy operation.
Done using Coccinelle.
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>
Bhumika Goyal [Sun, 13 Aug 2017 12:43:09 +0000 (08:43 -0400)]
media: pci: make snd_pcm_hardware const
Make these const as they are only used during a copy operation.
Done using Coccinelle.
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>
Bhumika Goyal [Sun, 13 Aug 2017 12:43:08 +0000 (08:43 -0400)]
media: usb: make snd_pcm_hardware const
Make these const as they are only used during a copy operation.
Done using Coccinelle.
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>
Arvind Yadav [Sun, 13 Aug 2017 08:54:45 +0000 (04:54 -0400)]
media: radio: constify usb_device_id
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Arvind Yadav [Sun, 13 Aug 2017 08:54:43 +0000 (04:54 -0400)]
media: usb: constify usb_device_id
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
'drivers/media/usb/b2c2/flexcop-usb.c' Fix checkpatch.pl error:
ERROR: space prohibited before open square bracket '['.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Tue, 8 Aug 2017 10:58:31 +0000 (06:58 -0400)]
media: exynos4-is: constify video_subdev structures
The v4l2_subdev_ops structures are only passed as the second
argument of v4l2_subdev_init, which is const, so the
v4l2_subdev_ops structures can be const as well.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Tue, 8 Aug 2017 10:58:28 +0000 (06:58 -0400)]
media: vimc: constify video_subdev structures
These structures are all only stored in fields of v4l2_subdev_ops
structures, all of which are const, so these structures can be const
as well.
Done with the help of Coccinelle.
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@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:21 +0000 (04:25 -0400)]
media: mtk-mdp: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </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@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:20 +0000 (04:25 -0400)]
media: exynos4-is: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:19 +0000 (04:25 -0400)]
media: vim2m: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </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@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:18 +0000 (04:25 -0400)]
media: mx2-emmaprp: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </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@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:17 +0000 (04:25 -0400)]
media: m2m-deinterlace: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </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@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:16 +0000 (04:25 -0400)]
media: bdisp: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </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@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:15 +0000 (04:25 -0400)]
media: exynos-gsc: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:14 +0000 (04:25 -0400)]
media: vcodec: mediatek: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Rick Chang <rick.chang@mediatek.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:13 +0000 (04:25 -0400)]
media: V4L2: platform: rcar_jpu: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Ulyanov Mikhail <mikhail.ulyanov@cogentembedded.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:12 +0000 (04:25 -0400)]
media: s5p-g2d: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:11 +0000 (04:25 -0400)]
media: ti-vpe: vpe: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </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@s-opensource.com>
Julia Lawall [Sun, 6 Aug 2017 08:25:10 +0000 (04:25 -0400)]
media: st-delta: constify v4l2_m2m_ops structures
The v4l2_m2m_ops structures are only passed as the only
argument to v4l2_m2m_init, which is declared as const.
Thus the v4l2_m2m_ops structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct v4l2_m2m_ops i@p = { ... };
@ok1@
identifier r.i;
position p;
@@
v4l2_m2m_init(&i@p)
@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct v4l2_m2m_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct v4l2_m2m_ops i = { ... };
// </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@s-opensource.com>
Julia Lawall [Sat, 5 Aug 2017 10:47:13 +0000 (06:47 -0400)]
media: imx: capture: constify vb2_ops structures
These vb2_ops structures are only stored in the ops field of a
vb2_queue structure, which is declared as const. Thus the vb2_ops
structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct vb2_ops i@p = { ... };
@ok@
identifier r.i;
struct vb2_queue e;
position p;
@@
e.ops = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct vb2_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct vb2_ops i = { ... };
// </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@s-opensource.com>
Julia Lawall [Sat, 5 Aug 2017 10:47:11 +0000 (06:47 -0400)]
media: blackfin: bfin_capture: constify vb2_ops structures
These vb2_ops structures are only stored in the ops field of a
vb2_queue structure, which is declared as const. Thus the vb2_ops
structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct vb2_ops i@p = { ... };
@ok@
identifier r.i;
struct vb2_queue e;
position p;
@@
e.ops = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct vb2_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct vb2_ops i = { ... };
// </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@s-opensource.com>
Julia Lawall [Sat, 5 Aug 2017 10:47:10 +0000 (06:47 -0400)]
media: staging: media: davinci_vpfe: constify vb2_ops structures
These vb2_ops structures are only stored in the ops field of a
vb2_queue structure, which is declared as const. Thus the vb2_ops
structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct vb2_ops i@p = { ... };
@ok@
identifier r.i;
struct vb2_queue e;
position p;
@@
e.ops = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct vb2_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct vb2_ops i = { ... };
// </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@s-opensource.com>
Julia Lawall [Sat, 5 Aug 2017 10:47:09 +0000 (06:47 -0400)]
media: davinci: vpbe: constify vb2_ops structures
These vb2_ops structures are only stored in the ops field of a
vb2_queue structure, which is declared as const. Thus the vb2_ops
structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct vb2_ops i@p = { ... };
@ok@
identifier r.i;
struct vb2_queue e;
position p;
@@
e.ops = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct vb2_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct vb2_ops i = { ... };
// </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@s-opensource.com>
Julia Lawall [Sat, 5 Aug 2017 10:47:08 +0000 (06:47 -0400)]
media: v4l2-pci-skeleton: constify vb2_ops structures
These vb2_ops structures are only stored in the ops field of a
vb2_queue structure, which is declared as const. Thus the vb2_ops
structures themselves can be const.
Done with the help of Coccinelle.
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct vb2_ops i@p = { ... };
@ok@
identifier r.i;
struct vb2_queue e;
position p;
@@
e.ops = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct vb2_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct vb2_ops i = { ... };
// </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@s-opensource.com>
Andrzej Pietrasiewicz [Tue, 8 Aug 2017 11:27:08 +0000 (07:27 -0400)]
media: s5p-jpeg: directly use parsed subsampling on exynos5433
On exynos5433 variant JPEG data is parsed by hardware only from SOS
marker, so subsampling is parsed by software. As such, its value need
not to be translated from hardware-specific encoding to V4L2 encoding.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Andrzej Pietrasiewicz [Tue, 8 Aug 2017 11:27:07 +0000 (07:27 -0400)]
media: s5p-jpeg: fix number of components macro
The value to be processed must be first masked and then shifted,
not the other way round.
Fixes:
6c96dbbc2aa9f5b4a ("[media] s5p-jpeg: add support for 5433")
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Tony K Nadackal [Tue, 8 Aug 2017 11:27:06 +0000 (07:27 -0400)]
media: s5p-jpeg: Clear JPEG_CODEC_ON bits in sw reset function
Bits EXYNOS4_DEC_MODE and EXYNOS4_ENC_MODE do not get cleared
on software reset. These bits need to be cleared explicitly.
Even though the bits in question are already cleared in interrupt
service routine, the reset should also clear them in case when
e.g. bootloader uses the codec and leaves it in a bad state.
[Updated commit message]
Signed-off-by: Tony K Nadackal <tony.kn@samsung.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Andrzej Pietrasiewicz [Tue, 8 Aug 2017 11:27:05 +0000 (07:27 -0400)]
media: s5p-jpeg: disable encoder/decoder in exynos4-like hardware after use
Clearing the bits turns off the encoder/decoder. If the hardware
is not turned off after use, at subsequent uses it does not work
in a stable manner, resulting in incorrect interrupt status value
being read and e.g. erroneous read of compressed bitstream size.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Tony K Nadackal [Tue, 8 Aug 2017 11:27:04 +0000 (07:27 -0400)]
Andrzej Pietrasiewicz [Fri, 11 Aug 2017 11:50:01 +0000 (07:50 -0400)]
media: s5p-jpeg: set w/h when encoding
q_data w/h must be set when encoding.
Fixes:
1c84e7f9d5dc596be (media: s5p-jpeg: Add support for resolution change event)
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Andrzej Pietrasiewicz [Fri, 11 Aug 2017 11:50:00 +0000 (07:50 -0400)]
media: s5p-jpeg: don't overwrite result's "size" member
Originally the "size" member was modified in a local variable passed to
s5p_jpeg_parse_hdr() but the member was not used by the caller, so it did
not matter. After applying patch
"media: s5p-jpeg: Don't use temporary structure in s5p_jpeg_buf_queue"
the unnecessary assignment started overwriting already assigned "size"
member of the passed structure with an incorrect value.
Fixes:
14a2de14dc0619bf9 ("media: s5p-jpeg: Don't use temporary structure in s5p_jpeg_buf_queue")
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Mauro Carvalho Chehab [Sun, 20 Aug 2017 11:45:41 +0000 (07:45 -0400)]
media: ddbridge: get rid of fall though gcc 7.1 warnings
drivers/media/pci/ddbridge/ddbridge-core.c: In function 'ddb_port_attach':
drivers/media/pci/ddbridge/ddbridge-core.c:2261:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (ret < 0)
^
drivers/media/pci/ddbridge/ddbridge-core.c:2263:2: note: here
case DDB_PORT_LOOP:
^~~~
drivers/media/pci/ddbridge/ddbridge-core.c: In function 'dvb_input_attach':
drivers/media/pci/ddbridge/ddbridge-core.c:1492:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (input->port->dev->link[input->port->lnr].info->ts_quirks &
^
drivers/media/pci/ddbridge/ddbridge-core.c:1497:2: note: here
case DDB_TUNER_DVBCT2_SONY_P:
^~~~
drivers/media/pci/ddbridge/ddbridge-core.c:1516:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
osc24 = 1;
~~~~~~^~~
drivers/media/pci/ddbridge/ddbridge-core.c:1517:2: note: here
case DDB_TUNER_DVBCT2_SONY:
^~~~
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 14:45:09 +0000 (10:45 -0400)]
media: dvb-frontends/cxd2841er: update moddesc wrt new chip support
Since the driver now recognizes and supports more chip variants, reflect
this fact in the module description accordingly.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Acked-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Julia Lawall [Mon, 14 Aug 2017 17:15:12 +0000 (13:15 -0400)]
media: ddbridge: constify stv0910_p and lnbh25_cfg
These structures are only copied into other structures, so
they can be const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:41:13 +0000 (06:41 -0400)]
media: ddbridge: const'ify all ddb_info, ddb_regmap et al
All data is accessed RO, so mark everything const. Some vars in several
functions aswell as function signatures also require the const keyword
now, they're also added by this commit.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:41:14 +0000 (06:41 -0400)]
media: ddbridge: bump version string to 0.9.31intermediate-integrated
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:41:12 +0000 (06:41 -0400)]
media: ddbridge: remove ddb_info's from the global scope
Since the DD hardware info and maps aren't needed anymore outside of
ddbridge-hw.c (they're returned via get_ddb_info() now), mark them
static and remove all refs from ddbridge-hw.h.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:41:10 +0000 (06:41 -0400)]
media: ddbridge: move ddb_unmap(), cleanup modparams
adapter_alloc is only used from within ddbridge-core, so move it there,
this removes the need for prototyping/referencing the variable. While at
it, msi isn't needed outside of ddbridge-main, so don't extref that one
aswell.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:41:11 +0000 (06:41 -0400)]
media: ddbridge: move device ID table to ddbridge-hw
This further cleans up ddbridge-main from hardware-related data and moves
the exact card type determination into ddbridge-hw.c:get_ddb_info(), right
to the hardware maps/structs. Also, const'ify more structs and pointers.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:41:09 +0000 (06:41 -0400)]
media: ddbridge: fix gap handling
Force gap setting if given by attribute and enable gap for older regmaps.
Also, setting a gap value of 128 via sysfs will now disable gap.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:29:15 +0000 (06:29 -0400)]
media: dvb-frontends/stv0910: fix mask for scramblingcode setup
The scrambling code has 4 bits. Fix the mask accordingly.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 20 Aug 2017 10:29:14 +0000 (06:29 -0400)]
media: dvb-frontends/stv0910: fix FE_HAS_LOCK check order in tune()
It should first read the status and then check if FE has lock.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 9 Jul 2017 19:42:46 +0000 (15:42 -0400)]
media: MAINTAINERS: add entry for mxl5xx
Add MAINTAINER's entry for this new driver.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 9 Jul 2017 19:42:45 +0000 (15:42 -0400)]
media: ddbridge: fix buffer overflow in max_set_input_unlocked()
Picked up code parts introduced one smatch error:
drivers/media/pci/ddbridge/ddbridge-maxs8.c:163 max_set_input_unlocked() error: buffer overflow 'dev->link[port->lnr].lnb.voltage' 4 <= 255
Fix this by clamping the .lnb.voltage array access to 0-3 by "& 3"'ing
dvb->input.
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 9 Jul 2017 19:42:44 +0000 (15:42 -0400)]
media: ddbridge: support MaxLinear MXL5xx based cards (MaxS4/8)
This enables MaxS4/S8 and Octopus Max card support in ddbridge by adding
glue code into ddbridge-core, having another PCI ID, and have the LNB IC
control code (and all other MaxS4/8 related code) in ddbridge-maxs8.c
(rather than another ~400 LoC in ddbridge-core.c like it's done in the
original vendor driver package).
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 9 Jul 2017 19:42:43 +0000 (15:42 -0400)]
media: dvb-frontends: MaxLinear MxL5xx DVB-S/S2 tuner-demodulator driver
This adds the frontend driver for the MaxLinear MxL5xx family of tuner-
demodulators, as used on Digital Devices MaxS4/8 four/eight-tuner cards.
The driver was picked from the dddvb vendor driver package and - judging
solely from the diff - has undergone a 100% rework:
- Silly #define's used to pass multiple values to functions were
expanded. This resulted in macro/register names not being usable
anymore for such occurences, but makes the code WAY more read-,
understand- and maintainable.
- CamelCase was changed to kernel_case
- All typedef were removed
- Overall code style was fixed, besides >80char lines in _defs.h and
_regs.h, checkpatch is happy.
- Also, signal stat acquisition was made to comply with the DVB API
ways to do these things.
Permission to reuse and mainline the driver code was formally granted by
Ralph Metzler <rjkm@metzlerbros.de>.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 10:13:15 +0000 (06:13 -0400)]
media: dvb-frontends/stv{0910,6111}: constify tables
Mark lookup tables and fe_ops things const so the compiler can put them
into .rodata.
While at it, improve name and identifier strings (moddesc, fe_ops).
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 10:13:14 +0000 (06:13 -0400)]
media: dvb-frontends/stv6111: cosmetics: comments fixup, misc
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 10:13:13 +0000 (06:13 -0400)]
media: dvb-frontends/stv6111: coding style cleanup
Fix up all remainders reported by checkpatch-strict.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 10:13:12 +0000 (06:13 -0400)]
media: dvb-frontends/stv0910: cosmetics: fixup comments, misc
Fix up block comment style, whitespaces, c++ style comments et al.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 10:13:11 +0000 (06:13 -0400)]
media: dvb-frontends/stv0910: further coding style cleanup
Fixes up all remainders reported by "checkpatch.pl --strict"
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 10:13:10 +0000 (06:13 -0400)]
media: dvb-frontends/stv0910: implement diseqc_send_burst
This implements the diseqc_send_burst frontend op to support sending
mini-DISEQC bursts. Picked up from dddvb's driver package where this
specific block was disabled via #if 0/#endif, but is still working
according to feedback from upstream, so add it.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sun, 23 Jul 2017 10:13:09 +0000 (06:13 -0400)]
media: dvb-frontends/stv0910: fix STR assignment, remove unneeded var
According to the documentation, FE_SCALE_DECIBEL values should be assigned
to .svalue and not .uvalue, so let's do this. While at it, remove the
unneeded strength var from read_signal_strength().
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:56:02 +0000 (07:56 -0400)]
media: MAINTAINERS: add entry for ddbridge
An entry for ddbridge driver was missing. Add it, now that it
moved to Maintained state.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:56:01 +0000 (07:56 -0400)]
media: ddbridge: Kconfig option to control the MSI modparam default
It is known that MSI interrupts - while working quite well so far - can
still cause issues on some hardware platforms (causing I2C timeouts due
to unhandled interrupts). The msi variable/option is set to 1 by default.
So, add a Kconfig option prefixed with "EXPERIMENTAL" that will control
the default value of that modparam, defaulting to off for a better
user experience and (guaranteed) stable operation "per default".
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:56:00 +0000 (07:56 -0400)]
media: ddbridge: fix dereference before check
Both ts_release() and ts_open() can use "output" before check (smatch):
drivers/media/pci/ddbridge/ddbridge-core.c:816 ts_release() warn: variable dereferenced before check 'output' (see line 809)
drivers/media/pci/ddbridge/ddbridge-core.c:836 ts_open() warn: variable dereferenced before check 'output' (see line 828)
Fix by performing checks on those pointers.
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:59 +0000 (07:55 -0400)]
media: ddbridge: fix impossible condition warning
Smatch and gcc complained:
drivers/media/pci/ddbridge/ddbridge-core.c:3491 bpsnr_show() warn: impossible condition '(snr[0] == 255) => ((-128)-127 == 255)'
drivers/media/pci/ddbridge/ddbridge-core.c: In function ‘bpsnr_show’:
drivers/media/pci/ddbridge/ddbridge-core.c:3491:13: warning: comparison is always false due to limited range of data type [-Wtype-limits]
Fix this by changing the type of snr to unsigned char.
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:58 +0000 (07:55 -0400)]
media: ddbridge: remove unreachable code
>From smatch:
drivers/media/pci/ddbridge/ddbridge-core.c:3490 snr_store() info: ignoring unreachable code.
In fact, the function immediately returns zero, so remove it and update
ddb_attrs_snr[] to not reference it anymore.
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:57 +0000 (07:55 -0400)]
media: ddbridge: fix possible buffer overflow in ddb_ports_init()
Report from smatch:
drivers/media/pci/ddbridge/ddbridge-core.c:2659 ddb_ports_init() error: buffer overflow 'dev->port' 32 <= u32max
Fix by making sure "p" is greater than zero before checking for
"dev->port[].type == DDB_CI_EXTERNAL_XO2".
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:56 +0000 (07:55 -0400)]
media: ddbridge: only register frontends in fe2 if fe is not NULL
Smatch reported:
drivers/media/pci/ddbridge/ddbridge-core.c:1602 dvb_input_attach() error: we previously assumed 'dvb->fe' could be null (see line 1595)
dvb->fe2 will ever only be populated when dvb->fe is set. So only handle
registration of dvb->fe2 when dvb->fe got set beforehand by moving the
registration into the "if (dvb->fe)" conditional.
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:55 +0000 (07:55 -0400)]
media: ddbridge: check pointers before dereferencing
Fixes two warnings reported by smatch:
drivers/media/pci/ddbridge/ddbridge-core.c:240 ddb_redirect() warn: variable dereferenced before check 'idev' (see line 238)
drivers/media/pci/ddbridge/ddbridge-core.c:240 ddb_redirect() warn: variable dereferenced before check 'pdev' (see line 238)
Fixed by moving the existing checks up before accessing members.
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:54 +0000 (07:55 -0400)]
media: ddbridge: split off hardware definitions and mappings
Further cleanup of ddbridge-core and ddbridge-main, and moves all such
hw definitions into one single place, making things easier to maintain.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:53 +0000 (07:55 -0400)]
media: ddbridge: split I/O related functions off from ddbridge.h
While it seems valid that headers can carry simple oneline static inline
annotated functions, move them into their own header file to have the
overall code more readable. Also, keep them as header (and don't put in
a separate object) and static inline to help the compiler avoid
generating function calls.
(Thanks to Jasmin J. <jasmin@anw.at> for valuable input on this!)
Cc: Jasmin J. <jasmin@anw.at>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Daniel Scheller [Sat, 12 Aug 2017 11:55:52 +0000 (07:55 -0400)]
media: ddbridge: bump ddbridge code to version 0.9.29
This huge patch bumps the ddbridge driver to version 0.9.29. Compared to
the vendor driver package, DD OctoNET including GTL link support, and all
DVB-C Modulator card support has been removed since this requires large
changes to the underlying DVB core API, which should eventually be done
separately, and, after that, the functionality/device support can be added
back rather easy.
While the diff is rather large, the bump is mostly a big refactor of all
data structures. Yet, the MSI support (message signaled interrupts) is
greatly improved, also all currently available CI single/duo bridge cards
are fully supported.
More changes compared to the upstream driver:
- the DDB_USE_WORKER flag/define was removed, kernel worker functionality
will be used.
- coding style is properly fixed (zero complaints from checkpatch)
- all (not much though) CamelCase has been fixed to kernel_case
- (private) IOCTLs temporarily removed (which are mainly used to provide
rarely-used FPGA update functionality)
Great care has been taken to keep all previous changes and fixes (e.g.
kernel logging via dev_*(), pointer annotations and such) intact.
Permission to reuse and mainline the driver code was formally granted by
Ralph Metzler <rjkm@metzlerbros.de>.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Tested-by: Jasmin Jessich <jasmin@anw.at>
Tested-by: Dietmar Spingler <d_spingler@freenet.de>
Tested-by: Manfred Knick <Manfred.Knick@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>