[media] cx25821: fix error return code and clean up
The function cx25821_sram_channel_setup_upstream_audio always return zero,
so the return value is not saved any more.
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
// </smpl>
While here, replace strlen()+kmemdup() to kstrdup().
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Reviewed-by: walter harms <wharms@bfs.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
when != &ret
*if(...)
{
... when != ret = e2
when forall
return ret;
}
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Fri, 16 Nov 2012 15:03:07 +0000 (12:03 -0300)]
[media] vpif_display: protect dma_queue by a spin_lock
The dma_queue list is accessed by both the interrupt handler and by normal
code. It needs to be protected by a lock to prevent possible list corruption.
Corruption has been observed in 'real-life' conditions. Adding this lock made
it go away.
Hans Verkuil [Fri, 16 Nov 2012 15:03:06 +0000 (12:03 -0300)]
[media] vpif_capture: protect dma_queue by a spin_lock
The dma_queue list is accessed by both the interrupt handler and by normal
code. It needs to be protected by a lock to prevent possible list corruption.
Wei Yongjun [Thu, 15 Nov 2012 12:18:17 +0000 (09:18 -0300)]
[media] davinci: vpif: fix return value check for vb2_dma_contig_init_ctx()
In case of error, the function vb2_dma_contig_init_ctx() returns
ERR_PTR() and never returns NULL. The NULL test in the return value
check should be replaced with IS_ERR().
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Wei Yongjun [Tue, 30 Oct 2012 12:49:38 +0000 (09:49 -0300)]
[media] davinci: vpif_display: fix return type check for v4l2_subdev_call()
The v4l2_subdev_call() call returns -ENODEV when subdev is
null and -ENOIOCTLCMD wnen no icotl is present.
This patch fixes the return type check for v4l2_subdev_call().
The pattern E == C1 && E == C2 is always false. This patch
fix this according to the assumption that && should be ||.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Wei Yongjun [Tue, 30 Oct 2012 12:45:00 +0000 (09:45 -0300)]
[media] davinci: vpif_capture: fix return type check for v4l2_subdev_call()
The v4l2_subdev_call() call returns -ENODEV when subdev is
null and -ENOIOCTLCMD wnen no icotl is present.
This patch fixes the return type check for v4l2_subdev_call().
The pattern E == C1 && E == C2 is always false. This patch
fix this according to the assumption that && should be ||.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)
Laurent Pinchart [Sat, 20 Oct 2012 20:47:22 +0000 (17:47 -0300)]
[media] v4l: Don't warn during link validation when encountering a V4L2 devnode
v4l2_subdev_link_validate_get_format() retrieves the remote pad format
depending on the entity type and prints a warning if the entity type is
not supported. The type check doesn't take the subtype into account, and
thus always prints a warning for device node types, even when supported.
Fix it.
[media] mt9v022: set y_skip_top field to zero as default
Set "y_skip_top" to zero and revise comment as I do not see this line
corruption on two different mt9v022 setups. The first read-out line
is perfectly fine. Add mt9v022 platform data configuring y_skip_top
for platforms that have issues with the first read-out line. Set
y_skip_top to 1 for pcm990 board.
[media] mt9v022: support required register settings in snapshot mode
Some camera systems cannot operate mt9v022 in normal mode and use
only the snapshot mode. The TechNote for mt9v022 (TN0960) and mt9v024
(TN-09-225) describes required register settings when configuring the
snapshot operation. The snapshot mode requires that certain automatic
functions of the image sensor should be disabled or set to fixed values.
According to the TechNote bit 2 and bit 9 in the register 0x20 must be
set in snapshot mode and unset for normal operation. This applies for
mt9v022 Rev.3 and mt9v024. Add required reg. 0x20 settings dependent on
sensor chip version.
Add controls for horizontal and vertical blanking. Also add an error
message for case that the control handler init failed. Since setting
the blanking registers is done by controls now, we shouldn't change
these registers outside of the control function. Use v4l2_ctrl_s_ctrl()
to set them.
Frank Schäfer [Sun, 23 Sep 2012 18:28:45 +0000 (15:28 -0300)]
[media] ov2640: add support for V4L2_MBUS_FMT_YUYV8_2X8, V4L2_MBUS_FMT_RGB565_2X8_BE
This is the result of experimenting with the SpeedLink VAD Laplace webcam.
The register sequence for V4L2_MBUS_FMT_YUYV8_2X8 has been identified by
analyzing USB-logs of this device running on MS Windows.
The mx1_camera driver has been broken for a few release cycles since
commit 6bd0812 (dmaengine: imx-dma: merge old dma-v1.c with imx-dma.c).
It seems there is no one even compile tested it since then, as doing
so will end up with the following error.
CC drivers/media/platform/soc_camera/mx1_camera.o
In file included from drivers/media/platform/soc_camera/mx1_camera.c:44:0:
arch/arm/mach-imx/include/mach/dma-mx1-mx2.h:8:25: fatal error: mach/dma-v1.h: No such file or directory
It seems there is no one being interested in bringing it back to
work [1] so far. Let's mark it BROKEN.
[1] https://lkml.org/lkml/2012/2/9/171
Shubhrajyoti D [Thu, 25 Oct 2012 04:02:36 +0000 (01:02 -0300)]
[media] adv7604: convert struct i2c_msg initialization to C99 format
Convert the struct i2c_msg initialization to C99 format. This makes
maintaining and editing the code simpler. Also helps once other fields
like transferred are added in future.
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sean Young [Wed, 24 Oct 2012 20:22:42 +0000 (17:22 -0300)]
[media] winbond-cir: add carrier detection
The winbond hardware has a counter for leading edges, which increases as
they are received. As we read raw IR from a fifo in an interrupt handler,
we cannot correlate them to specific IR pulses so we simply count all
pulses and edges until we go idle and disable the receiver.
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sean Young [Wed, 24 Oct 2012 20:22:40 +0000 (17:22 -0300)]
[media] winbond-cir: fix idle mode
The receiver is never disabled by idle mode since rxstate never gets set
to RXSTATE_ACTIVE, so we keep on getting interrupts after the first IR
activity ends. Note that ir_raw_event_reset() already calls
ir_raw_event_handle().
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Ezequiel Garcia [Thu, 1 Nov 2012 11:42:00 +0000 (08:42 -0300)]
[media] stkwebcam: Fix sparse warning on undeclared symbol
The sparse warning is:
"drivers/media/usb/stkwebcam/stk-webcam.c:59:5:
warning: symbol 'first_init' was not declared. Should it be static?"
Declare variable 'first_init' as static and local to the function.
Found by Hans Verkuil's daily build. Tested by compilation only.
Murali Karicheri [Mon, 22 Oct 2012 14:41:36 +0000 (11:41 -0300)]
[media] media:davinci: clk - {prepare/unprepare} for common clk
As a first step towards migrating davinci platforms to use common clock
framework, replace all instances of clk_enable() with clk_prepare_enable()
and clk_disable() with clk_disable_unprepare().
Also fixes some issues related to clk clean up in the driver
Lad, Prabhakar [Fri, 9 Nov 2012 08:59:32 +0000 (05:59 -0300)]
[media] media: davinci: vpbe: fix build warning
Warnings were generated because of the following commit changed data type for
address pointer 195bbca ARM: 7500/1: io: avoid writeback addressing modes for __raw_ accessors
add __iomem annotation to fix following warnings
drivers/media/platform/davinci/vpbe_osd.c: In function ‘osd_read’:
drivers/media/platform/davinci/vpbe_osd.c:49:2: warning: passing
argument 1 of ‘__raw_readl’ makes pointer from integer without a cast [enabled by default]
arch/arm/include/asm/io.h:104:19: note: expected ‘const volatile
void *’ but argument is of type ‘long unsigned int’
This patch stores the ioremap_nocache() returned address in a
void __iomem * instead of a unsigned long and passes the same to
readl/writel functions which fixes the above warnings.
YAMANE Toshiaki [Mon, 5 Nov 2012 10:38:46 +0000 (07:38 -0300)]
[media] staging/media: Use dev_ printks in go7007/go7007-fw.c
fixed below checkpatch warning.
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
YAMANE Toshiaki [Mon, 5 Nov 2012 10:38:12 +0000 (07:38 -0300)]
[media] staging/media: Use dev_ or pr_ printks in go7007/wis-saa7113.c
fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
YAMANE Toshiaki [Mon, 5 Nov 2012 10:36:26 +0000 (07:36 -0300)]
[media] staging/media: Use dev_ or pr_ printks in go7007/wis-saa7115.c
fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
YAMANE Toshiaki [Fri, 2 Nov 2012 11:09:29 +0000 (08:09 -0300)]
[media] Staging/media: Use dev_ printks in go7007/wis-ov7640.c
fixed below checkpatch warnings.
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
Frank Schäfer [Sun, 23 Sep 2012 13:29:43 +0000 (10:29 -0300)]
[media] gspca_pac7302: use registers 0x01 and 0x03 for red and blue balance controls
Currently used registers 0xc5 and 0xc7 provide only a very coarse
adjustment possibility within a very small value range (0-3).
With registers 0x01 and 0x03, a fine grained adjustment with
255 steps is possible. This is also what the Windows driver does.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
R,G,B balance registers are 0x01-0x03 instead of 0x02-0x04,
which lead to the wrong conclusion that values are inverted.
Exposure is controlled via page 3 registers and this is already documented.
Also fix a whitespace issue.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Ezequiel Garcia [Wed, 24 Oct 2012 00:20:30 +0000 (21:20 -0300)]
[media] stk1160: Try to continue with fewer transfer buffers
Many people are trying to use stk1160 on low memory devices.
Instead of failing if one allocation fails, we allow the driver
to continue working if fewer transfer buffers are available.
As reported by Antti and by Stephen:
drivers/built-in.o: In function `sms_ir_event':
/home/david/checkouts/linux/drivers/media/common/siano/smsir.c:48: undefined reference to `ir_raw_event_store'
/home/david/checkouts/linux/drivers/media/common/siano/smsir.c:50: undefined reference to `ir_raw_event_handle'
drivers/built-in.o: In function `sms_ir_init':
/home/david/checkouts/linux/drivers/media/common/siano/smsir.c:56: undefined reference to `smscore_get_board_id'
/home/david/checkouts/linux/drivers/media/common/siano/smsir.c:60: undefined reference to `rc_allocate_device'
/home/david/checkouts/linux/drivers/media/common/siano/smsir.c:72: undefined reference to `sms_get_board'
/home/david/checkouts/linux/drivers/media/common/siano/smsir.c:92: undefined reference to `sms_get_board'
/home/david/checkouts/linux/drivers/media/common/siano/smsir.c:97: undefined reference to `rc_register_device'
/home/david/checkouts/linux/drivers/media/common/siano/smsir.c:100: undefined reference to `rc_free_device'
drivers/built-in.o: In function `sms_ir_exit':
/home/david/checkouts/linux/drivers/media/common/siano/smsir.c:111: undefined reference to `rc_unregister_device'
make: *** [vmlinux] Error 1
Caused by commit fdd1eeb49d36 "[media] siano: allow compiling it without RC support"
And it happens when CONFIG_SMS_SIANO_RC=y and CONFIG_RC_CORE=m .
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Stefan Richter [Sat, 3 Nov 2012 08:25:20 +0000 (09:25 +0100)]
[media] firedtv: add MAINTAINERS entry
There is currently discussion to add MAINTAINERS records for media
drivers that don't have one yet, possibly with 'orphan' or 'odd fixes'
status. Here is a proper entry for the firedtv driver (for 1394
attached DVB STBs and 1394 attached DVB cards from Digital Everywhere).
The L: linux-media and T: linux-media.git lines in this entry are
redundant to what scripts/get_maintainer.pl would show automatically but
I added them for folks who read MAINTAINERS directly. The "(firedtv)"
string is for those folks as well if they look for driver name rather
than file path.
The F: drivers/media/firewire/ pattern and the "FireWire media drivers"
title are currently synonymous with firedtv. If more drivers get added
there, this can be revisited.
I don't have documentation or DVB-S2 devices to test, but I have DVB-C
and DVB-T devices for testing.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
While this file was always maintained, there was no explicit entry
for it.
There aren't many things happening at tm6000 side for a long time:
Driver works. This chip is already not sold anymore, so I don't
expect much changes on its side.
So, add a new entry with status equal to Odd fixes to better
reflect it.
While this file was always maintained, there was no explicit entry
for it.
There aren't many things happening at saa7134 side for a long time:
Driver works, and it is stable. When new patches are submitted,
they're new boards addition for hardware I don't have.
So, add a new entry with status equal to Odd fixes to better
reflect it.
While this file was always maintained, there was no explicit entry
for it.
There aren't many things happening at cx88 side for a long time:
Driver works, and it is stable. When new patches are submitted,
they're new boards addition for hardware I don't have.
So, add a new entry with status equal to Odd fixes to better
reflect it.
There aren't many things happening at bttv side for a long time:
Driver works, and it is stable. When new patches are submitted,
they're new boards addition for hardware I don't have. So,
move its status to Odd fixes to better reflect it.
David Härdeman [Wed, 31 Oct 2012 07:22:08 +0000 (04:22 -0300)]
[media] hid-picolcd_cir: fix compilation
Commit c003ab1bedf0 ("[media] rc-core: add separate defines for
protocol bitmaps and numbers") overlooked hid-picolcd.
This patch (against git.linuxtv.org/media_tree.git, branch
staging/for_v3.8) fixes the compilation breakage.
Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sakari Ailus [Mon, 22 Oct 2012 19:27:27 +0000 (16:27 -0300)]
[media] smiapp-pll: Try other pre-pll divisors
The smiapp pll calculator assumed that the minimum pre-pll divisor was
perfect. That may not always be the case, so let's try the others, too.
Typically there are just a few alternatives.
drivers/media/tuners/xc4000.c: In function ‘check_firmware’:
drivers/media/tuners/xc4000.c:1048:45: warning: ‘fw_minor’ may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/media/tuners/xc4000.c:1048:39: warning: ‘fw_major’ may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/media/tuners/xc4000.c:1062:39: warning: ‘hw_minor’ may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/media/tuners/xc4000.c:1062:33: warning: ‘hw_major’ may be used uninitialized in this function [-Wmaybe-uninitialized]
[media] drxk_hard: fix the return code from an error handler
While it is very unlikely, if the number of parameters for
QAMDemodulatorCommand is not 2 or 4, status become undefined:
/home/hans/work/build/v4l-dvb-git/drivers/media/dvb-frontends/drxk_hard.c: In function ‘QAMDemodulatorCommand’:
/home/hans/work/build/v4l-dvb-git/drivers/media/dvb-frontends/drxk_hard.c:5452:5: warning: ‘status’ may be used uninitialized in this function [-Wuninitialized]
Kirill Smelkov [Mon, 22 Oct 2012 17:14:01 +0000 (14:14 -0300)]
[media] v4l2: Fix typo in struct v4l2_captureparm description
Judging from what drivers do and from my experience temeperframe
fraction is set in seconds - look e.g. here
static int bttv_g_parm(struct file *file, void *f,
struct v4l2_streamparm *parm)
{
struct bttv_fh *fh = f;
struct bttv *btv = fh->btv;
v4l2_video_std_frame_period(bttv_tvnorms[btv->tvnorm].v4l2_id,
&parm->parm.capture.timeperframe);
...
void v4l2_video_std_frame_period(int id, struct v4l2_fract *frameperiod)
{
if (id & V4L2_STD_525_60) {
frameperiod->numerator = 1001;
frameperiod->denominator = 30000;
} else {
frameperiod->numerator = 1;
frameperiod->denominator = 25;
}
and also v4l2-ctl in userspace decodes this as seconds:
if (doioctl(fd, VIDIOC_G_PARM, &parm, "VIDIOC_G_PARM") == 0) {
const struct v4l2_fract &tf = parm.parm.capture.timeperframe;
...
printf("\tFrames per second: %.3f (%d/%d)\n",
(1.0 * tf.denominator) / tf.numerator,
tf.denominator, tf.numerator);
The typo was there from day 1 - added in 2002 in e028b61b ([PATCH]
add v4l2 api)(*)
(*) found in history tree
git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git
Kirill Smelkov [Mon, 22 Oct 2012 12:54:43 +0000 (09:54 -0300)]
[media] vivi: Kill BUFFER_TIMEOUT macro
Usage of BUFFER_TIMEOUT has gone in 2008 in 78718e5d (V4L/DVB (7492):
vivi: Simplify the vivi driver and avoid deadlocks), but the macro
remains. Say goodbye to it.
Sakari Ailus [Sun, 21 Oct 2012 18:30:02 +0000 (15:30 -0300)]
[media] v4l: Correct definition of v4l2_buffer.flags related to cache management
V4L2_BUF_FLAG_NO_CACHE_INVALIDATE and V4L2_BUF_FLAG_NO_CACHE_CLEAN were
define incorrectly in the documentation. Fix this by changing the
documentation to match reality.
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Gregor Jasny [Thu, 18 Oct 2012 11:20:47 +0000 (08:20 -0300)]
[media] Add Fujitsu Siemens Amilo Pi 2530 to gspca upside down table
I've got an webcam upside down report for the following system:
System Information
Manufacturer: FUJITSU SIEMENS
Product Name: AMILO Pi 2530
Version:
Serial Number:
UUID: <removed>
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Not Specified
Base Board Information
Manufacturer: FUJITSU SIEMENS
Product Name: F42
Version: 00030D0000000001
Serial Number: <removed>
Currently an entry in the gspca/m5602 quirk table is missing.
Signed-off-by: Gregor Jasny <gjasny@googlemail.com> Acked-by: Erik Andrén <erik.andren@gmail.com> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Randy Dunlap [Tue, 16 Oct 2012 19:17:59 +0000 (16:17 -0300)]
[media] i2c/s5k4ecgx: fix printk format warning
Fix printk format warning for size_t variable:
drivers/media/i2c/s5k4ecgx.c:346:2: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This makes the cleanup on probe failure more consistent with other
drivers. This is similar to what commit f27b853ea24a9b70585f9251384d97929e6551c3 ("[media] rc: Fix invalid
free_region and/or free_irq on probe failure") did for some other
drivers.
In addition to making the cleanup more consistent, this also fixes a
case where (on a ene_hw_detect failure) free_region would be called on a
region that was not requested yet.
This last problem was probably introduced by the moving of code in
commit b31b021988fed9e3741a46918f14ba9b063811db ("[media] ene_ir: Fix
driver initialisation") and commit 9ef449c6b31bb6a8e6dedc24de475a3b8c79be20 ("[media] rc: Postpone ISR
registration").
Paul Bolle [Sun, 14 Oct 2012 18:50:11 +0000 (15:50 -0300)]
[media] staging: lirc_serial: silence GCC warning
Building lirc_serial.o triggers this GCC warning:
drivers/staging/media/lirc/lirc_serial.c: In function '__check_sense':
drivers/staging/media/lirc/lirc_serial.c:1301:1: warning: return from incompatible pointer type [enabled by default]
This can be trivially fixed by changing the 'sense' parameter from bool
to int. But, to be safe, we also need to make sure 'sense' will only be
-1, 0, or 1. There's no need to document the new values that are now
allowed for the 'sense' parameter, since they're basically useless.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Cc: Jarod Wilson <jarod@wilsonet.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
radio tea5764, si4713: get rid of warning: no previous prototype
drivers/media/radio/radio-tea5764.c:148:5: warning: no previous prototype for 'tea5764_i2c_read' [-Wmissing-prototypes]
drivers/media/radio/radio-tea5764.c:168:5: warning: no previous prototype for 'tea5764_i2c_write' [-Wmissing-prototypes]
drivers/media/radio/si4713-i2c.c:1772:6: warning: no previous prototype for 'si4713_ioctl' [-Wmissing-prototypes]
fintek-cir: get rid of warning: no previous prototype Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
drivers/media/rc/fintek-cir.c:687:5: warning: no previous prototype for 'fintek_init' [-Wmissing-prototypes]
drivers/media/rc/fintek-cir.c:692:6: warning: no previous prototype for 'fintek_exit' [-Wmissing-prototypes]
[media] fmdrv: Don't check if unsigned are below zero
drivers/media/radio/wl128x/fmdrv_common.c:745:3: warning: comparison is always false due to limited range of data type [-Wtype-limits]
drivers/media/radio/wl128x/fmdrv_rx.c:308:2: warning: comparison is always false due to limited range of data type [-Wtype-limits]
drivers/media/pci/bt8xx/bttv-driver.c:308:3: warning: initialized field overwritten [-Woverride-init]
drivers/media/pci/bt8xx/bttv-driver.c:308:3: warning: (near initialization for 'bttv_tvnorms[0].cropcap.bounds.height') [-Woverride-init]
drivers/media/pci/bt8xx/bttv-driver.c: In function 'bttv_remove':
drivers/media/pci/bt8xx/bttv-driver.c:4467:29: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]