1
0
Fork 0
Commit Graph

868 Commits (09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a)

Author SHA1 Message Date
Hans Verkuil c1d9e03d4e [media] vino/saa7191: move to staging in preparation for removal
These drivers haven't been tested in a long, long time. The hardware is
ancient and hopelessly obsolete. These drivers also need to be converted
to newer media frameworks but due to the lack of hardware that's going
to be impossible.

So these drivers are a prime candidate for removal. If someone is
interested in working on these drivers to prevent their removal, then
please contact the linux-media mailinglist.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-16 23:21:42 -02:00
Linus Torvalds dab363f938 Staging patches for 3.19-rc1
Here's the big staging tree pull request for 3.19-rc1.
 
 We continued to delete more lines than were added, always a good thing,
 but not at a huge rate this release, only about 70k lines removed
 overall mostly from removing the horrid bcm driver.
 
 Lots of normal staging driver cleanups and fixes all over the place,
 well over a thousand of them, the shortlog shows all the horrid details.
 
 The "contentious" thing here is the movement of the Android binder code
 out of staging into the "real" part of the kernel.  This is code that
 has been stable for a few years now and is working as-is in the tens of
 millions of devices with no issues.  Yes, the code is horrid, and the
 userspace api leaves a lot to be desired, but it's not going to change
 due to legacy issues that we have no control over.  Because so many
 devices and companies rely on this, and the code is stable, might as
 well promote it out of staging.
 
 This was all discussed at the Linux Plumbers conference, and everyone
 participating agreed that this was the best way forward.
 
 There is work happening to replace the binder code with something new
 that is happening right now, but I don't expect to see the results of
 that work for another year at the earliest.  If that ever happens, and
 Android switches over to it, I'll gladly remove this version.
 
 As for maintainers, I'll be glad to maintain this code, I've been doing
 it for the past few years with no problems.  I'll send a MAINTAINERS
 entry for it before 3.19-final is out, still need to talk to the Google
 developers about if they are willing to help with it or not, last I
 checked they were, which was good.
 
 All of these patches have been in linux-next for a while with no
 reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlSPICkACgkQMUfUDdst+yksdwCfSLE9VUy1o2sAPDRe+J3bQced
 EWEAoL3RtnejKbo5tHS2IT69pLrwiIDS
 =YXyM
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver updates from Greg KH:
 "Here's the big staging tree pull request for 3.19-rc1.

  We continued to delete more lines than were added, always a good
  thing, but not at a huge rate this release, only about 70k lines
  removed overall mostly from removing the horrid bcm driver.

  Lots of normal staging driver cleanups and fixes all over the place,
  well over a thousand of them, the shortlog shows all the horrid
  details.

  The "contentious" thing here is the movement of the Android binder
  code out of staging into the "real" part of the kernel.  This is code
  that has been stable for a few years now and is working as-is in the
  tens of millions of devices with no issues.  Yes, the code is horrid,
  and the userspace api leaves a lot to be desired, but it's not going
  to change due to legacy issues that we have no control over.  Because
  so many devices and companies rely on this, and the code is stable,
  might as well promote it out of staging.

  This was all discussed at the Linux Plumbers conference, and everyone
  participating agreed that this was the best way forward.

  There is work happening to replace the binder code with something new
  that is happening right now, but I don't expect to see the results of
  that work for another year at the earliest.  If that ever happens, and
  Android switches over to it, I'll gladly remove this version.

  As for maintainers, I'll be glad to maintain this code, I've been
  doing it for the past few years with no problems.  I'll send a
  MAINTAINERS entry for it before 3.19-final is out, still need to talk
  to the Google developers about if they are willing to help with it or
  not, last I checked they were, which was good.

  All of these patches have been in linux-next for a while with no
  reported issues"

* tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1382 commits)
  Staging: slicoss: Fix long line issues in slicoss.c
  staging: rtl8712: remove unnecessary else after return
  staging: comedi: change some printk calls to pr_err
  staging: rtl8723au: hal: Removed the extra semicolon
  lustre: Deletion of unnecessary checks before three function calls
  staging: lustre: fix sparse warnings: static function declaration
  staging: lustre: fixed sparse warnings related to static declarations
  staging: unisys: remove duplicate header
  staging: unisys: remove unneeded structure
  staging: ft1000 : replace __attribute ((__packed__) with __packed
  drivers: staging: rtl8192e: Include "asm/unaligned.h" instead of "access_ok.h" in "rtl819x_BAProc.c"
  Drivers:staging:rtl8192e: Fixed checkpatch warning
  Drivers:staging:clocking-wizard: Added a newline
  staging: clocking-wizard: check for a valid clk_name pointer
  staging: rtl8723au: Hal_InitPGData() avoid unnecessary typecasts
  staging: rtl8723au: _DisableAnalog(): Avoid zero-init variables unnecessarily
  staging: rtl8723au: Remove unnecessary wrapper _ResetDigitalProcedure1()
  staging: rtl8723au: _ResetDigitalProcedure1_92C() reduce code obfuscation
  staging: rtl8723au: Remove unnecessary wrapper _DisableRFAFEAndResetBB()
  staging: rtl8723au: _DisableRFAFEAndResetBB8192C(): Reduce code obfuscation
  ...
2014-12-15 18:06:13 -08:00
Linus Torvalds e6b5be2be4 Driver core patches for 3.19-rc1
Here's the set of driver core patches for 3.19-rc1.
 
 They are dominated by the removal of the .owner field in platform
 drivers.  They touch a lot of files, but they are "simple" changes, just
 removing a line in a structure.
 
 Other than that, a few minor driver core and debugfs changes.  There are
 some ath9k patches coming in through this tree that have been acked by
 the wireless maintainers as they relied on the debugfs changes.
 
 Everything has been in linux-next for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlSOD20ACgkQMUfUDdst+ylLPACg2QrW1oHhdTMT9WI8jihlHVRM
 53kAoLeteByQ3iVwWurwwseRPiWa8+MI
 =OVRS
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core update from Greg KH:
 "Here's the set of driver core patches for 3.19-rc1.

  They are dominated by the removal of the .owner field in platform
  drivers.  They touch a lot of files, but they are "simple" changes,
  just removing a line in a structure.

  Other than that, a few minor driver core and debugfs changes.  There
  are some ath9k patches coming in through this tree that have been
  acked by the wireless maintainers as they relied on the debugfs
  changes.

  Everything has been in linux-next for a while"

* tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
  Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
  fs: debugfs: add forward declaration for struct device type
  firmware class: Deletion of an unnecessary check before the function call "vunmap"
  firmware loader: fix hung task warning dump
  devcoredump: provide a one-way disable function
  device: Add dev_<level>_once variants
  ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
  ath: use seq_file api for ath9k debugfs files
  debugfs: add helper function to create device related seq_file
  drivers/base: cacheinfo: remove noisy error boot message
  Revert "core: platform: add warning if driver has no owner"
  drivers: base: support cpu cache information interface to userspace via sysfs
  drivers: base: add cpu_device_create to support per-cpu devices
  topology: replace custom attribute macros with standard DEVICE_ATTR*
  cpumask: factor out show_cpumap into separate helper function
  driver core: Fix unbalanced device reference in drivers_probe
  driver core: fix race with userland in device_add()
  sysfs/kernfs: make read requests on pre-alloc files use the buffer.
  sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
  fs: sysfs: return EGBIG on write if offset is larger than file size
  ...
2014-12-14 16:10:09 -08:00
Markus Elfring 71947828ca [media] mn88473: One function call less in mn88473_init() after error
The release_firmware() function was called by the mn88473_init() function even
if a previous function call "request_firmware" failed.
This implementation detail could be improved by the introduction of another
jump label.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-04 16:00:47 -02:00
Markus Elfring b59113845f [media] mn88473: Remove uneeded check before release_firmware()
The release_firmware() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-04 16:00:17 -02:00
Markus Elfring e8379ecff3 [media] lirc_zilog: Deletion of unnecessary checks before vfree()
The vfree() function performs also input parameter validation. Thus the test
around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-04 15:47:06 -02:00
Hans Verkuil 57e774cc91 [media] staging/media: fix querycap
Querycap shouldn't set the version field (the core does that for you),
but it should set the device_caps field.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-02 11:30:04 -02:00
Hans Verkuil a48ff17dbb [media] staging/media/Makefile: drop omap24xx reference
The omap2 media driver got removed. Remove a left-over for
tcm825x driver that were also at omap2 tree.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-25 08:07:27 -02:00
Christian Resell 5937a784c3 [media] staging: media: bcm2048: fix coding style error
Simple style fix (checkpatch.pl: "space prohibited before that ','").
For the eudyptula challenge (http://eudyptula-challenge.org/).

Signed-off-by: Christian F. Resell <christian.resell@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-21 16:50:37 -02:00
Hans Verkuil db85a0403b [media] omap24xx/tcm825x: remove deprecated omap2 camera drivers.
The omap2 camera driver and the tcm825x sensor driver have been
deprecated for a year and are now being removed. They are unmaintained
and they use an internal API that has long since been superseded by a
much better API. Worse, that internal API has been abused by out-of-kernel
trees (i.MX6).

In addition, Sakari stated that these drivers have never been in a
usable state in the mainline kernel due to missing platform data.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Cc: David Cohen <dacohen@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-21 15:55:23 -02:00
Boris BREZILLON 3336f07aa6 [media] staging: media: Make use of MEDIA_BUS_FMT_ definitions
In order to have subsytem agnostic media bus format definitions we've
moved media bus definition to include/uapi/linux/media-bus-format.h and
prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT.

Reference new definitions in all media drivers residing in staging.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.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@osg.samsung.com>
2014-11-14 17:55:08 -02:00
Antti Palosaari 0c5d216d56 [media] mn88473: add staging TODO
Add TODO for mainlining.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14 17:26:59 -02:00
Antti Palosaari 4f80d85881 [media] mn88473: move to staging
It is not ready enough to be released on mainline.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14 17:26:05 -02:00
Antti Palosaari c8301777a2 [media] mn88472: add staging TODO
Add TODO for mainlining.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14 17:22:51 -02:00
Antti Palosaari c867b265b1 [media] mn88472: move to staging
It is not ready enough to be released on mainline.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-14 17:22:34 -02:00
Aya Mahfouz f80bdc281e staging: media: lirc: modify print calls
This patches replaces one pr_debug call by dev_dbg and
changes the device used by one of the dev_err calls.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05 14:49:14 -08:00
Martin Kaiser 77d381af73 [media] lirc: use kfifo_initialized() on lirc_buffer's fifo
We can use kfifo_initialized() to check if the fifo in lirc_buffer is
initialized or not. There's no need to have a dedicated fifo status
variable in lirc_buffer.

[m.chehab@samsung.com: add the same change to lirc_zilog, to avoid
 breaking compilation of staging drivers]
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 12:53:05 -02:00
Sean Young 3e5907e695 [media] lirc_igorplugusb: remove
This driver has been replaced by an rc-core driver for the same hardware.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 12:19:30 -02:00
Amber Thrall f3a75505ab [media] Staging: media: lirc: cleaned up packet dump in 2 files
lirc_imon.c and lirc_sasem.c contain an incoming_packet method that
is using deprecated printk's.  Removed blocks replacing with single
dev_info with a %*ph format instead.

Signed-off-by: Amber Thrall <amber.rose.thrall@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 08:38:17 -02:00
Aya Mahfouz 7ede7af3fd staging: media: lirc: lirc_zilog.c: remove unnecessary 'out of memory' message
This patch fixes the following the following checkpatch.pl warning:

Possible unnecessary 'out of memory' message

The warning was issued for the file lirc_zilog.c after changing
two custom printk messages to dev_err. The dev_err calls were
simply removed.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 13:12:05 -07:00
Tapasweni Pathak d82e62deb5 staging: media: lirc: Remove useless cast on void pointer
void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Build tested it.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 13:05:48 -07:00
Tapasweni Pathak ad1d2a4fc8 staging: media: davinci_vpfe: Remove useless cast on void pointer
void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Build tested it.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 13:05:47 -07:00
anuvazhayil af3491b370 Staging: media: dm365_isif: Add blank line after variable declarations
WARNING: Missing a blank line after declarations

Signed-off-by: anuvazhayil <anuv.1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 15:39:55 +08:00
Aya Mahfouz 72f3f59e73 staging: media: lirc: lirc_bt829.c: replace dprintk by dev_dbg
This patch removes the custom printk macro dprintk and replaces all
the calls made to it by dev_dbg.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 15:36:36 +08:00
Aya Mahfouz 732ba199ab staging: media: lirc: lirc_imon.c: replace printk by dev_dbg
This patch replaces the calls to printk by dev_dbg.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 15:36:36 +08:00
Aya Mahfouz c96bf1d6a4 staging: media: lirc: lirc_sir.c: use pr_debug and dev_dbg instead of dprintk
This patch removes the custom printk macro dprintk and replaces most of
the calls made to it by dev_dbg. pr_debug was used when the calling
function did not provide the appropiate device variable.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 15:36:36 +08:00
Aya Mahfouz be4aa8157c staging: media: lirc: lirc_zilog.c: replace custom print macros with dev_* and pr_*
This patch removes the custom printk macros dprintk, zilog_notify,
zilog_error, and zilog_info. All the calls to these macros were
replaced by dev_dbg, dev_notice, dev_err, and dev_info respectively
whenever possible. There were cases in which pr_debug, pr_notice,
pr_err and pr_info were used. It was when the calling function did
not provide an appropiate dev variable.

Applying this patch will trigger the out of memory checkpatch warning
for two lines. It will be fixed in a separate patch.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 15:36:36 +08:00
Jiayi Ye 1d06bb4e9d staging: remove unneeded parentheses around the right hand side of an assignment
In assignments such as value = (FLASH_CMD_STATUS_REG_READ << 24);, parentheses
are not needed. The Coccinelle semantic patch was used to find cases.

@r@
identifier x;
expression e1, e2;
@@

- x = (e1 << e2);
+ x = e1 << e2;

Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:06 +08:00
Aybuke Ozdemir eca6a8872a staging: media: lirc: Use pr_* instead of printk
This patch focuses on fixing the following warning generated by
checkpatch.pl for the file lirc_sasem.c:
WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then
dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
WARNING: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then
dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:06 +08:00
Aybuke Ozdemir 1002a240ed staging: media: omap24xx: Use min_t instead of min
This patch focuses on fixing the following warning generated by
checkpatch.pl for the file tcm825x.c:

WARNÄ°NG: min() should probably be min_t(u32, tgt_xclk, TCM825X_XCLK_MAX)

The changes were applied using the following coccinelle rule:
@@
expression e1, e2;
typedef u32;
@@

-tgt_xclk = min(e1, (u32)e2);
+tgt_xclk = min_t(u32, e1, e2);

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23 14:10:49 +08:00
Tapasweni Pathak 2c1bfc3be0 staging: media: lirc: Delete unused function tv2int
The function tv2int is used to convert timeval to int.

32-bit systems using 'struct timeval' will break in the year 2038,
so we have to replace that code with more appropriate types.
This patch changes the lirc_imon.c file of media: lirc driver.

tv2int function is static and not used anywhere in this file too,
so it is removed. I also build tested it.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23 12:48:31 +08:00
Wolfram Sang b096ba9534 staging: media: omap4iss: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:21:40 +02:00
Wolfram Sang 8c5bd8111b staging: media: omap24xx: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:21:39 +02:00
Wolfram Sang 305f3de8d1 staging: media: lirc: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:21:39 +02:00
Wolfram Sang 95f87b9283 staging: media: davinci_vpfe: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:21:38 +02:00
Tapasweni Pathak 2129e17ef5 staging: media: davinci_vpfe: Replace *__iomem with __iomem *
This patch fixes defective positional use of __iomem, wherever
present in media: davinci_vpfe.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:16 +08:00
Tapasweni Pathak c3cefd3c3c staging: media: cxd2009: use usleep_range()
This patch fixes checkpatch.pl warning in file cxd2099.c
WARNING : msleep < 20ms can sleep for up to 20ms; see
Documentation/timers/timers-howto.txt

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:16 +08:00
Tapasweni Pathak d92c54f6c0 staging: media: ompa4iss: Replace sprintf with snprintf
This patch replaces sprintf with snprintf as sprintf does
not check for buffer overflow.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:16 +08:00
Kumari Radha b717a65a7b staging: media: omap4iss: Remove unnecessary 'out of memory' message
This patch removes unnecessay out of memory message fixing the following checkpach.pl warning in iss.c:
WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Kumari Radha <kumari.radha3@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:16 +08:00
Kumari Radha cfafe92c1e staging: media: omap24xx: Remove unnecessary 'out of memory' message
This patch removes unnecessay out of memory message fixing the following checkpach.pl warning in omap24xxcam.c:
WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Kumari Radha <kumari.radha3@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:16 +08:00
Linus Torvalds 4d9708ea5e media updates for v3.18-rc1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUNr9iAAoJEAhfPr2O5OEVSygP/iVpHK7JZCFSvy1ly67gUcIw
 zeO2q0Exm3WwApchaCNX0b9qB9A6jeaRiJtuqOgR7L8ksYorku7k12g0IrveK8e4
 UhwscWw1HkYvTR3JG4Z2a8LoYiUatQCgcknICgjJ12fo2fCg2SnzbGp9jKiLqJew
 dx1zOgn5Hslqy+PWQULtkLo/XxdlAX8YNUhXU5q5gxCfhciaJ7Kq+tvM9NodobHG
 u94b10fmOclLug37b+Vpg01pxjqe+X+HbrHzbOsL7dvxW84igqzpyb9+WNH8FGZZ
 +oSu66faokH8rVxzkPyODT8TSwHuqafVF1IFafsFFJpYYfRWiY0SttMACVMuuB3z
 m6kVM9pTApmh736xvzB4JP4i/+aIu2qQftYTybQkTpn1AIy2kw8b09pOWbhEgdjl
 5CfI7I2iSkSviZXMrIe51znIhdxohF7gEN8PyaPto3N1LHVnHAd7/J43nolSSnke
 DE0lQGk+NaGFv/MiESiKC8lSiEGzqpMkrxpOIeDZAsKxQ3ihxKai3kqAYYiPt2+n
 2HVhLsmfMqdd23DGSf7LjhhLqjXKhEC/+LDsLl105keRYLN/TYZuQxieJEDikRF/
 NLJcuuXUQkcsdgrAChAonu1K3roAsgZ8E6BP+814CWZ5LM4xW0kQqqKN6S88eKx2
 HcIz2xwveR6sZBNZE7Kl
 =DUbD
 -----END PGP SIGNATURE-----

Merge tag 'media/v3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:

 - new IR driver: hix5hd2-ir

 - the virtual test driver (vivi) was replaced by vivid, with has an
   almost complete set of features to emulate most v4l2 devices and
   properly test all sorts of userspace apps

 - the as102 driver had several bugs fixed and was properly split into a
   frontend and a core driver.  With that, it got promoted from staging
   into mainstream

 - one new CI driver got added for CIMaX SP2/SP2HF (sp2 driver)

 - one new frontend driver for Toshiba ISDB-T/ISDB-S demod (tc90522)

 - one new PCI driver for ISDB-T/ISDB-S (pt3 driver)

 - saa7134 driver got support for go7007-based devices

 - added a new PCI driver for Techwell 68xx chipsets (tw68)

 - a new platform driver was added (coda)

 - new tuner drivers: mxl301rf and qm1d1c0042

 - a new DVB USB driver was added for DVBSky S860 & similar devices

 - added a new SDR driver (hackrf)

 - usbtv got audio support

 - several platform drivers are now compiled with COMPILE_TEST

 - a series of compiler fixup patches, making sparse/spatch happier with
   the media stuff and removing several warnings, especially on those
   platform drivers that didn't use to compile on x86

 - Support for several new modern devices got added

 - lots of other fixes, improvements and cleanups

* tag 'media/v3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (544 commits)
  [media] ir-hix5hd2: fix build on c6x arch
  [media] pt3: fix DTV FE I2C driver load error paths
  Revert "[media] media: em28xx - remove reset_resume interface"
  [media] exynos4-is: fix some warnings when compiling on arm64
  [media] usb drivers: use %zu instead of %zd
  [media] pci drivers: use %zu instead of %zd
  [media] dvb-frontends: use %zu instead of %zd
  [media] s5p-mfc: Fix several printk warnings
  [media] s5p_mfc_opr: Fix warnings
  [media] ti-vpe: Fix typecast
  [media] s3c-camif: fix dma_addr_t printks
  [media] s5p_mfc_opr_v6: get rid of warnings when compiled with 64 bits
  [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64
  [media] em28xx: Fix identation
  [media] drxd: remove a dead code
  [media] saa7146: remove return after BUG()
  [media] cx88: remove return after BUG()
  [media] cx88: fix cards table CodingStyle
  [media] radio-sf16fmr2: declare some structs as static
  [media] radio-sf16fmi: declare pnp_attached as static
  ...
2014-10-10 22:04:49 -04:00
Yeliz Taneroglu 4571c4f6f6 staging: media: Fixed else after return or break warning
The following patch fixes the checkpatch.pl warning:

drivers/staging/media/omap4iss/iss_csi2.c:811 warning: else is not generally useful after a break or return

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02 13:51:03 -07:00
Yeliz Taneroglu ae357388c2 staging: media: omap4iss: Fixed else after return or break warning
The following patch fixes the checkpatch.pl warning:

drivers/staging/media/omap4iss/iss_ipipe.c:184 warning: else is not generally useful after a break or return

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02 13:51:03 -07:00
Mahati Chamarthy 50b47bbd43 Staging: media: omap24xx: Merge two lines and remove unused variable
This patch merges two lines and removes a variable that becomes unused
after merging.

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02 09:33:46 -07:00
Greg Kroah-Hartman 89f904388d Revert "staging: media: cxd2099: use usleep_range()"
This reverts commit 7b86477c0e.

It was broken and broke the build :(

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02 09:27:37 -07:00
Gulsah Kose 9eeea5eb6b staging: media: omap4iss: Removed unnecessary else expression.
This patch fixes "else is not generally useful after a break or return"
checkpatch.pl warning iss_resizer.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:03:25 -04:00
Gulsah Kose 8d89818461 staging: media: omap4iss: Removed unnecessary else expression.
This patch fixes "else is not generally useful after a break or return"
checkpatch.pl warning iss_ipipeif.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:03:24 -04:00
Gulsah Kose f399140abb staging: media: omap24xx: Added blank line.
This patch fixes "Missing a blank line after declarations" checkpatch.pl
warning in tcm825x.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:03:24 -04:00
Gulsah Kose f18bba082f staging: media: omap24xx: Added new line after declarations.
This patch fixes "Missing a blank line after declarations" checkpatch.pl
warning in omap24xxcam-dma.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:03:24 -04:00
Tapasweni Pathak 7b86477c0e staging: media: cxd2099: use usleep_range()
This patch fixes checkpatch.pl warning in file cxd2099.c
WARNING : msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:03:24 -04:00
Mahati Chamarthy a46e43e7de Staging: media: davinci_vpfe: Remove unused variable
This patch removes a variable which has never been used. The following
Coccinelle semantic patch was used to make this transformation:

@@
type T;
identifier i;
constant C;
@@

- T i;
  <... when != i
- i = C;
  ...>

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:00:27 -04:00
Heena Sirwani 31907c0e5c Staging: media: davinci_vpfe: Removed unnecessary out of memory message logging.
The following patch removes the checkpatch.pl warning:
WARNING: possible unnecessary out of memory message.

Signed-off-by: Heena Sirwani <heenasirwani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:00:27 -04:00
Gulsah Kose fb67f44549 staging: media: lirc: Removed unnecessary else expression.
This patch fixes "else is not generally useful after a break or return"
checkpatch.pl warning lirc_parallel.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:56:48 -04:00
Tapasweni Pathak dbc5a5b690 Staging: media: lirc: Add new line after declarations
This patch fixes checkpatch.pl warning in files of media/lirc
WARNING : Missing a blank line after declarations

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 22:56:47 -04:00
Mahati Chamarthy a3d822b8e3 Staging: media: omap24xx: Fix else is not useful warning
This fixes the following checkpatch.pl warning:
WARNING: else is not generally useful after a break or return

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:33:23 -07:00
Mahati Chamarthy a579c97823 Staging: media: lirc: Merge two lines and remove unused variable
This patch merges an assignment with an immediately following return of
the assigned variable. It also removes a variable that becomes unused due to this transformation.
The following Coccinelle semantic patch was used to make this transformation:

@r@
identifier ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

@@
identifier r.ret;
expression e1;
type t;
@@

(
-t ret = e1;
|
-t ret;
)
 ... when != ret
     when strict

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:31:33 -07:00
Dan Carpenter 3232e04df7 [media] staging: lirc: freeing ERR_PTRs
We call kfree(data_buf) in the error handling and that will oops if this
is an error pointer.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23 16:13:36 -03:00
Tapasweni Pathak 20f4f1a053 staging: media: lirc: remove unnecessary break after return
This patch fixes checkpatch.pl warning in lirc_serial.c file
WARNING : break is not useful after goto or return

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:15:43 -07:00
Tapasweni Pathak c5366563d5 Staging: media: lirc: fixed else after return or break warning
This patch fixes checkpatch.pl warning in file lirc_serial.c
WARNING : else is not generally useful after a break or return

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:13:48 -07:00
Gulsah Kose abb0bdad0c staging: media: lirc: Fixed quoted string split warning.
This patch fixes "quoted string split across lines" checkpatch.pl
warning in lirc_imon.c.

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:05:41 -07:00
Gulsah Kose 00ef07e362 staging: media: omap4iss: Fix missing blank line warning.
Fixes "Missing a blank line after declarations" checkpatch.pl warning in
iss_video.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:05:41 -07:00
Gulsah Kose 9d374b2c7a staging: media: omap4iss: Fixes missing blank line warning.
Fixes "Missing a blank line after declarations" checkpatch.pl warning in
iss_csi2.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 11:05:41 -07:00
Aybuke Ozdemir fcf1b73d08 Staging: media: cxd2099: Missing a blank line after declarations
Fix checkpatch.pl issues with missing a blank
line after declarations in cxd2099.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:42:15 -07:00
Gulsah Kose 5ad6ae1acf staging: media: lirc: Fixes missing blank line warning.
Fixes "Missing a blank line after declarations" checkpatch.pl warning in
lirc_serial.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:40:44 -07:00
Gulsah Kose a5613fe896 staging: media: lirc: Fixes unnecessary return warning.
This patch fixes "void function return statements are not generally
useful" checkpatch.pl warning in lirc_zilog.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:40:44 -07:00
Gulsah Kose a17ec4c9fd staging: media: lirc: Fix missing blank line warning.
Fixes "Missing a blank line after declarations" checkpatch.pl warning in
lirc_bt829.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:39:45 -07:00
Gulsah Kose 3f8028023c staging: media: lirc: Fix missing blank line warning.
Fixes "Missing a blank line after declarations" checkpatch.pl warning in
lirc_sasem.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:39:45 -07:00
Gulsah Kose a87ba73ed1 staging: media: lirc: Fix unnecessary return warning.
This patch fixes "void function return statements are not generally
useful" checkpatch.pl warning in lirc_sasem.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:39:45 -07:00
Gulsah Kose fd8392f309 staging: media: lirc: Fix missing blank line warning.
Fixes "Missing a blank line after declarations" checkpatch.pl warning in
lirc_zilog.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:39:45 -07:00
Tina Johnson 3170f3277b Staging: media: lirc: lirc_imon: Removed unnecessary variable to simplify return variable handling
Variable rc was removed after merging its assignment statement with
immediately following return statement. Variable retval is not used
at all other that to return its initial value.Hence replaced retval
with its initial value in the return statement and removed the variable.

This patch was done using Coccinelle script and the following semantic
patch was used:

@rule1@
identifier ret;
expression e;
@@

-int ret = 0;
 ... when != ret
(
-ret = e;
+return e;
-return ret;
|
-return ret;
+return 0;
)

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:39:45 -07:00
Ankita Patil 335d9c85be Staging: dgap: Remove unnecessary variable.
This patch removes unnecessary variable in file dgap.c
using Coccinelle. Semantic patch for this is as follows:

@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

Also removed the unneeded variable manually.

Signed-off-by: Ankita Patil <patil.ankita.r@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:53:57 -07:00
Mauro Carvalho Chehab 12bd88e62c [media] be sure that HAS_DMA is enabled for vb2-dma-contig
vb2-dma-contig depends on HAS_DMA, but the Kbuild doesn't take
it into account at select.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26 18:52:19 -03:00
Mauro Carvalho Chehab 821ee47e0e Revert "[media] staging: omap4iss: copy paste error in iss_get_clocks"
This patch readded a call to iss_put_clocks(), with was removed
by changeset 1153be56a1, causing a compilation breakage.

This reverts commit d4b3264646.
2014-08-26 18:52:16 -03:00
Vitaly Osipov d4b3264646 [media] staging: omap4iss: copy paste error in iss_get_clocks
It makes more sense to return PTR_ERR(iss->iss_ctrlclk) here. The
current code looks like an oversight in pasting the block just above
this one.

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:34 -05:00
Mauro Carvalho Chehab d6317c68f3 [media] as102: promote it out of staging
This driver is stable and doesn't contain any really serious
issue. Move it out of staging.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:28 -05:00
Martin Kepplinger 2179de602c [media] staging: media: as102: replace custom dprintk() with dev_dbg()
remove dprintk() and replace it with dev_dbg() or pr_debug()
in order to use the common kernel coding style.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:28 -05:00
Zheng Di 381d7f79da [media] staging: media: lirc_parallel.c: fix coding style
This patch fix checkpatch:
WARNING: else is not generally useful after a break or return
WARNING: line over 80 characters

[m.chehab@samsung.com: Fix conflicts and use a better coding style for
 passing the parameters to parport_register_device()]
Signed-off-by: Zheng Di <zhengdi05@gmail.com>

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26 16:34:51 -03:00
Rasmus Villemoes c6e58110da [media] staging: omap4iss: Fix type of struct iss_device::crashed
The crashed member of struct iss_device is documented to be a bitmask,
but a bool doesn't hold that many (usable) bits. Lines 589 and 659 of
iss.c strongly suggest that "unsigned int" was meant (the same type as
struct iss_pipeline::entities). Currently, any crashed entity will be
blamed on index 0, which is unlikely to be what was intended.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26 15:04:09 -03:00
Himangi Saraogi 56a65a1eb0 [media] staging: lirc: Introduce the use of managed interfaces
This patch introduces the use of managed interfaces like
devm_request_mem_region and devm_request_irq and does away with the
calls to free the allocated memory in the probe and remove functions.
The remove function is no longer required and is removed completely.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26 15:02:16 -03:00
Raphael Poggi 280373533f [media] staging: lirc: remove return void function
This patch fix checkpath "WARNING: void function return statements are not generally useful".
The removed return were useless in that case.

Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26 15:01:20 -03:00
Raphael Poggi b799455ef3 [media] staging: lirc: fix checkpath errors: blank lines
This patch fix checkpath "WARNING: Missing a blank line after declarations"

Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26 15:00:48 -03:00
Heinrich Schuchardt aecfa5af1e [media] v4l: omap4iss: configuration using uninitialized variable
Variable reg is not initialized.
Random values are written to OMAP4 ISS registers if !ctx->eof_enabled.

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26 12:27:33 -03:00
Arnd Bergmann 64438fe65a [media] staging: lirc: remove sa1100 support
The LIRC support for sa1100 appears to have never worked
because it relies on header files that have never been
present in git history. Actually trying to build the
driver on an ARM sa1100 kernel fails, so let's just remove
the broken support.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Jarod Wilson <jarod@wilsonet.com>
Cc: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26 00:42:18 -03:00
Daeseok Youn e9035152d7 [media] staging: lirc: remove redundant NULL check in unregister_from_lirc()
"ir" is already checked before calling unregister_from_lirc().

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23 19:52:42 -03:00
Hans Verkuil 7955f03d18 [media] go7007: move out of staging into drivers/media/usb.
Now that the custom motion detection API in this driver has been
replaced with a standard API there is no reason anymore to keep it
in staging. So (finally!) move it to drivers/media/usb.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:53:33 -03:00
Hans Verkuil 28cae868cd [media] solo6x10: move out of staging into drivers/media/pci.
Now that the custom motion detection API has been replaced with a
standard API there is no reason anymore to keep it in staging.

So (finally!) move it to drivers/media/pci.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 12:53:00 -03:00
Dan Carpenter 7e0ffd1f40 [media] davinci: vpfe: dm365: remove duplicate RSZ_LPF_INT_MASK
The RSZ_LPF_INT_MASK define is cut and pasted twice so we can remove the
second instance.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 00:57:22 -03:00
Lad, Prabhakar 509578f9b6 [media] media: davinci_vpfe: dm365_resizer: fix sparse warning
this patch fixes following sparse warning,
dm365_resizer.c:223:1: warning: symbol 'resizer_calculate_resize_ratios' was not declared. Should it be static?
dm365_resizer.c:313:5: warning: symbol 'resizer_configure_output_win' was not declared. Should it be static?

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 00:56:59 -03:00
Lad, Prabhakar 3b12c89d0d [media] staging: media: davinci_vpfe: fix checkpatch warning
This patch fixes following checkpatch warning,
media/davinci_vpfe/dm365_ipipe.c:1271: WARNING: Missing a blank line after declarations
media/davinci_vpfe/dm365_ipipe.c:1313: WARNING: Missing a blank line after declarations

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 00:56:14 -03:00
Hans Verkuil 1c6f3db04f [media] solo6x10: a few checkpatch fixes
Added a blank line after variable declarations where checkpatch
requested that, and removed the 'write to the FSF' paragraph,
again as requested.

This is in preparation of the move out of staging into drivers/media.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 00:37:59 -03:00
Hans Verkuil 9707cb55c9 [media] go7007: update the README, fix checkpatch warnings
This prepares the driver for moving out of staging.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-22 00:07:01 -03:00
Antti Palosaari fd8b5f5029 msi2500: move msi3101 out of staging and rename
Move msi3101 out of staging and rename to msi2500.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-21 23:15:12 -03:00
Antti Palosaari f3e775962c [media] airspy: move out of staging into drivers/media/usb
Move it out of staging into media like all the other SDR drivers
too. There is no good reasons to keep these SDR drivers in staging.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-21 21:01:54 -03:00
Antti Palosaari eb83eab7fe [media] airspy: remove v4l2-compliance workaround
v4l2-compliance is now happy with frequency ranges where both lower
and upper limit is same.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-21 20:59:39 -03:00
Antti Palosaari 77bbb2b049 rtl2832_sdr: move from staging to media
Move rtl2832_sdr driver module from staging to media.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-21 20:55:41 -03:00
Antti Palosaari 150dcf5575 msi001: move out of staging
Move MSi001 driver from staging to drivers/media/tuners/.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-21 20:30:52 -03:00
Mauro Carvalho Chehab d9d889d324 staging/airspy: fix a compilation warning
drivers/staging/media/airspy/airspy.c: In function 'airspy_stop_streaming':
drivers/staging/media/airspy/airspy.c:569:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
  int ret;
      ^

Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-21 20:30:36 -03:00
Antti Palosaari 565092c6cd [media] DocBook: V4L: add V4L2_SDR_FMT_CS14LE - 'CS14'
V4L2_SDR_FMT_CS14LE is complex signed 14-bit sample format, used
for software defined radio devices.

[m.chehab@samsung.com: remove V4L2_FL_USE_FH_PRIO setting to avoid
 compilation breakage, as this flag doesn't exist anymore]

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-21 20:28:02 -03:00
Antti Palosaari 634fe50339 [media] airspy: AirSpy SDR driver
AirSpy SDR driver.

Thanks to Youssef Touil and Benjamin Vernoux for support, help and
hardware!
http://airspy.com/

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-21 20:22:14 -03:00
Andrey Utkin 7fcec4c14b [media] staging/media/davinci_vpfe/dm365_ipipeif.c: fix negativity check
[linux-3.16-rc5/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:210]:
(style) Checking if unsigned variable 'val' is less than zero.

    val = get_oneshot_mode(ipipeif->input);
    if (val < 0) {
        pr_err("ipipeif: links setup required");
        return -EINVAL;
    }

but

static int get_oneshot_mode(enum ipipeif_input_entity input)

Introduced temporary variable for negativity check.
"val" is afterwards used in a lot of bitwise operations, so changing its type
to signed is not safe, according to CERT C Secure Coding Standards chapter
INT13-C: "Use bitwise operators only on unsigned operands"
https://www.securecoding.cert.org/confluence/display/seccode/INT13-C.+Use+bitwise+operators+only+on+unsigned+operands

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80521

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-21 19:31:58 -03:00
Luke Hart b317d0f585 [media] radio-bcm2048.c: Fix some checkpatch.pl errors
Fix the following warnings reported in radio-bcm2048.c:

WARNING: else is not generally useful after a break or return
374: FILE: radio-bcm2048.c:374:
+		return 0;
+	} else {

WARNING: else is not generally useful after a break or return
728: FILE: radio-bcm2048.c:728:
+			return BCM2048_DE_EMPHASIS_75us;
+		else

WARNING: unchecked sscanf return value
1974: FILE: radio-bcm2048.c:1974:
+	sscanf(buf, mask, &value);					\

WARNING: Missing a blank line after declarations
2245: FILE: radio-bcm2048.c:2245:
+		unsigned char tmpbuf[3];
+		tmpbuf[i] = bdev->rds_info.radio_text[bdev->rd_index+i+2];

WARNING: Possible unnecessary 'out of memory' message
2601: FILE: radio-bcm2048.c:2601:
+	if (!bdev) {
+		dev_dbg(&client->dev, "Failed to alloc video device.\n");

The following error was left since it seems to be a false positive:

ERROR: Macros with complex values should be enclosed in parenthesis
+#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check)		\
+property_write(prop, signal size, mask, check)				\
+property_read(prop, size, mask)

Signed-off-by: Luke Hart <luke.hart@birchleys.eu>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 20:07:05 -03:00
Anil Belur a0f7fe5b14 [media] staging: media: bcm2048: radio-bcm2048.c - removed IRQF_DISABLED macro
- this patch removes IRQF_DISABLED macro, as this is
  deprecated/noop.

Signed-off-by: Anil Belur <askb23@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 20:05:03 -03:00
Andrey Utkin 63e9b45b03 [media] solo6x10: update GOP size, QP immediately
Previously, it was needed to reopen device to update GOP size and
quantization parameter. Now we update device registers with new values
immediately.

Signed-off-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 20:04:40 -03:00
Andrey Utkin 5698111605 [media] solo6x10: expose encoder quantization setting as V4L2 control
solo6*10 boards have configurable quantization parameter which takes
values from 0 to 31, inclusively.

This change enables setting it with ioctl VIDIOC_S_CTRL with id
V4L2_CID_MPEG_VIDEO_H264_MIN_QP.

Signed-off-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 20:04:20 -03:00
Geert Uytterhoeven d169e86857 [media] staging/solo6x10: SOLO6X10 should select BITREVERSE
If CONFIG_SOLO6X10=y, but CONFIG_BITREVERSE=m:

    drivers/built-in.o: In function `solo_osd_print':
    (.text+0x1c7a1f): undefined reference to `byte_rev_table'
    make: *** [vmlinux] Error 1

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 19:58:27 -03:00
Laurent Pinchart cb766937e3 [media] v4l: omap4iss: Signal fatal errors to the vb2 queue
When a fatal error occurs in the pipeline signal it to the vb2 queue
with a call to vb2_queue_error(). The queue will then take care to
return -EIO when preparing buffers, remove the driver-specific code that
now duplicates that check.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 16:22:41 -03:00
Laurent Pinchart 1153be56a1 [media] v4l: omap4iss: Use the devm_* managed allocators
This simplifies remove and error code paths.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 16:21:40 -03:00
Laurent Pinchart 1866123425 [media] v4l: omap4iss: Add module debug parameter
The parameter is used to initialize the video node debug field and
activate the V4L debug infrastructure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 16:21:06 -03:00
Laurent Pinchart 2b44ac9e84 [media] v4l: omap4iss: Don't reinitialize the video qlock at every streamon
Initialize the spin lock once only when initializing the video object.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 16:20:50 -03:00
Vitaly Osipov 057ef1e56c [media] v4l: omap4iss: Copy paste error in iss_get_clocks
It makes more sense to return PTR_ERR(iss->iss_ctrlclk) here. The
current code looks like an oversight in pasting the block just above
this one.

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 16:20:24 -03:00
Arnd Bergmann 3ed1a0023c [media] v4l: omap4iss: tighten omap4iss dependencies
The OMAP4 camera support depends on I2C and VIDEO_V4L2, both
of which can be loadable modules. This causes build failures
if we want the camera driver to be built-in.

This can be solved by turning the option into "tristate",
which unfortunately causes another problem, because the
driver incorrectly calls a platform-internal interface
for omap4_ctrl_pad_readl/omap4_ctrl_pad_writel.

Instead, this patch just forbids the invalid configurations
and ensures that the driver can only be built if all its
dependencies are built-in.

Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 16:19:53 -03:00
Hans Verkuil 0ee58f8487 [media] go7007: add motion detection support
This patch adds motion detection support to the go7007 driver using the new
motion detection controls, events.

The global motion detection works fine, but the regional motion detection
support probably needs more work. There seems to be some interaction between
regions that makes setting correct thresholds difficult. The exact meaning of
the thresholds isn't entirely clear either.

I do not have any documentation, the only information I have is the custom code
in the driver and a modet.c application.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 11:57:32 -03:00
Hans Verkuil c5b250ad35 [media] solo6x10: check dma_map_sg() return value
The dma_map_sg() function can fail, so check for the return value.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 11:57:32 -03:00
Hans Verkuil 761f9aa23f [media] solo6x10: fix 'dma from stack' warning
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 11:57:31 -03:00
Hans Verkuil 316d9e84a7 [media] solo6x10: implement the motion detection event
Use the new motion detection event.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 11:57:31 -03:00
Hans Verkuil 4063a3c781 [media] solo6x10: implement the new motion detection controls
Replace the custom ioctls to set motion detection thresholds by standard
matrix controls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 11:57:30 -03:00
Hans Verkuil 2a9ec37311 [media] v4l2-ctrls: use ptrs for all but the s32 type
Rather than having two unions for all types just keep 'val' and
'cur.val' and use the p_cur and p_new unions to access all others.

The only reason for keeping 'val' and 'cur.val' is that it is used
all over, so converting this as well would be a huge job.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 11:57:17 -03:00
Hans Verkuil 0ba2aeb6da [media] v4l2-ctrls: increase internal min/max/step/def to 64 bit
While VIDIOC_QUERYCTRL is limited to 32 bit min/max/step/def values
for controls, the upcoming VIDIOC_QUERY_EXT_CTRL isn't. So increase
the internal representation to 64 bits in preparation.

Because of these changes the msi3101 driver has been modified slightly
to fix a formatting issue (%d becomes %lld), vivi had to be modified
as well to cope with the new 64-bit min/max values and the PIXEL_RATE
control in a few sensor drivers required proper min/max/def values.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 09:18:09 -03:00
Ramakrishnan Muthukrishnan 95cd5d5ee6 [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO
Since all the drivers that use `struct v4l2_fh' use the core
priority checking, the setting of the flag in the drivers can
be removed.

Signed-off-by: Ramakrishnan Muthukrishnan <ramakrmu@cisco.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04 16:14:59 -03:00
Anthony DeStefano 7e49027e62 [media] staging: solo6x10: fix for sparse warning message
Define jpeg_dqt as static.

Signed-off-by: Anthony DeStefano <adx@fastmail.fm>
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04 16:11:27 -03:00
Hans Verkuil c0e11a2a24 [media] sn9c102: remove deprecated driver
During the media summit meeting in Edinburgh it was decided to move this
driver to staging as the first step to removing it altogether.

Most webcams covered by this driver are now supported by gspca. Nobody has the
hardware or is willing to convert the remaining devices to gspca.

This driver needs a major overhaul to have it conform to the latest frameworks
and compliancy tests.

Without hardware, however, this is next to impossible. Given the fact that
this driver seems to be pretty much unused (it has been removed from Fedora
several versions ago and nobody complained about that), we decided to drop
this driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Luca Risolia <luca.risolia@studio.unibo.it>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04 16:10:57 -03:00
Ovidiu Toader 941a8204d0 [media] staging/media/rtl2832u_sdr: fix coding style problems by adding blank lines
This minor patch fixes all WARNING:SPACING style warnings in rtl2832_sdr.c

The new version of the file pleases checkpatch.pl when run with "--ignore LONG_LINE".

Signed-off-by: Ovidiu Toader <ovi@phas.ubc.ca>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04 16:09:42 -03:00
Anthony DeStefano 85594960f5 [media] staging: rtl2832_sdr: fixup checkpatch/style issues
rtl2832_sdr.c: fixup checkpatch issues about long lines

Aligned stuff under the ( for this version.

Signed-off-by: Anthony DeStefano <adx@fastmail.fm>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04 16:08:57 -03:00
Linus Torvalds 338c09a94b Merge branch 'topic/omap3isp' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull OMAP3 updates from Mauro Carvalho Chehab:
 "Some driver improvements on OMAP3.  This series depend on some iommu
  patches already merged"

* 'topic/omap3isp' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (26 commits)
  [media] omap3isp: Rename isp_buffer isp_addr field to dma
  [media] omap3isp: Move to videobuf2
  [media] v4l: vb2: Add a function to discard all DONE buffers
  [media] omap3isp: Cancel all queued buffers when stopping the video stream
  [media] omap3isp: Move buffer irqlist to isp_buffer structure
  [media] omap3isp: Move queue irqlock to isp_video structure
  [media] omap3isp: Move queue mutex to isp_video structure
  [media] omap3isp: queue: Don't build scatterlist for kernel buffer
  [media] omap3isp: Use the ARM DMA IOMMU-aware operations
  [media] omap3isp: queue: Use sg_alloc_table_from_pages()
  [media] omap3isp: queue: Map PFNMAP buffers to device
  [media] omap3isp: queue: Fix the dma_map_sg() return value check
  [media] omap3isp: queue: Allocate kernel buffers with dma_alloc_coherent
  [media] omap3isp: queue: Inline the ispmmu_v(un)map functions
  [media] omap3isp: queue: Merge the prepare and sglist functions
  [media] omap3isp: queue: Use sg_table structure
  [media] omap3isp: queue: Move IOMMU handling code to the queue
  [media] omap3isp: video: Set the buffer bytesused field at completion time
  [media] omap3isp: ccdc: Use the DMA API for FPC
  [media] omap3isp: ccdc: Use the DMA API for LSC
  ...
2014-06-12 23:04:28 -07:00
Linus Torvalds aaeb255433 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media into next
Pull media updates from Mauro Carvalho Chehab:
 "This contains:
   - a new frontend/tuner driver set for si2168 and sa2157
   - Videobuf 2 core now supports DVB too
   - A new gspca sub-driver (dtcs033)
   - saa7134 is now converted to use videobuf2
   - add support for 4K timings
   - several other driver fixes and improvements

  PS.  This pull request is shorter than usual, partly because I have
  some other patches on topic branches that I'll be sending you later
  this week"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (286 commits)
  [media] au0828-dvb: restore its permission to 644
  [media] xc5000: delay tuner sleep to 5 seconds
  [media] xc5000: Don't use whitespace before tabs
  [media] xc5000: fix CamelCase
  [media] xc5000: Don't wrap msleep()
  [media] xc5000: get rid of positive error codes
  [media] au0828: reset streaming when a new frequency is set
  [media] au0828: Improve debug messages for urb_completion
  [media] au0828: Cancel stream-restart operation if frontend is disconnected
  [media] dib0700: fix RC support on Hauppauge Nova-TD
  [media] USB: as102_usb_drv.c: Remove useless return variables
  [media] v4l: Fix documentation of V4L2_PIX_FMT_H264_MVC and VP8 pixel formats
  [media] m5mols: Replace missing header
  [media] staging: lirc: Fix sparse warnings
  [media] fix mceusb endpoint type identification/handling
  [media] az6027: Added the PID for a new revision of the Elgato EyeTV Sat DVB-S Tuner
  [media] DocBook media: fix typo
  [media] adv7604: Add missing include to linux/types.h
  [media] v4l: Validate fields in the core code for subdev EDID ioctls
  [media] v4l: Add support for DV timings ioctls on subdev nodes
  ...
2014-06-04 14:24:30 -07:00
Linus Torvalds 1aacb90eaa Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial into next
Pull trivial tree changes from Jiri Kosina:
 "Usual pile of patches from trivial tree that make the world go round"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits)
  staging: go7007: remove reference to CONFIG_KMOD
  aic7xxx: Remove obsolete preprocessor define
  of: dma: doc fixes
  doc: fix incorrect formula to calculate CommitLimit value
  doc: Note need of bc in the kernel build from 3.10 onwards
  mm: Fix printk typo in dmapool.c
  modpost: Fix comment typo "Modules.symvers"
  Kconfig.debug: Grammar s/addition/additional/
  wimax: Spelling s/than/that/, wording s/destinatary/recipient/
  aic7xxx: Spelling s/termnation/termination/
  arm64: mm: Remove superfluous "the" in comment
  of: Spelling s/anonymouns/anonymous/
  dma: imx-sdma: Spelling s/determnine/determine/
  ath10k: Improve grammar in comments
  ath6kl: Spelling s/determnine/determine/
  of: Improve grammar for of_alias_get_id() documentation
  drm/exynos: Spelling s/contro/control/
  radio-bcm2048.c: fix wrong overflow check
  doc: printk-formats: do not mention casts for u64/s64
  doc: spelling error changes
  ...
2014-06-04 08:50:34 -07:00
Linus Torvalds e5c4ecdc55 USB driver patches for 3.16-rc1
Here is the big USB driver pull request for 3.16-rc1.
 
 Nothing huge here, but lots of little things in the USB core, and in
 lots of drivers.  Hopefully the USB power management will be work better
 now that it has been reworked to do per-port power control dynamically.
 There's also a raft of gadget driver updates and fixes, CONFIG_USB_DEBUG
 is finally gone now that everything has been converted over to the
 dynamic debug inteface, the last hold-out drivers were cleaned up and
 the config option removed.  There were also other minor things all
 through the drivers/usb/ tree, the shortlog shows this pretty well.
 
 All have been in linux-next, including the very last patch, which came
 from linux-next to fix a build issue on some platforms.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iEYEABECAAYFAlONYEMACgkQMUfUDdst+ynxvgCggMQBhN5icth8Y5hFglNNaISN
 c4AAoMHR2kb62U1plylLbPnboQTjfcl0
 =fG6y
 -----END PGP SIGNATURE-----

Merge tag 'usb-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb into next

Pull USB driver updates from Greg KH:
 "Here is the big USB driver pull request for 3.16-rc1.

  Nothing huge here, but lots of little things in the USB core, and in
  lots of drivers.  Hopefully the USB power management will be work
  better now that it has been reworked to do per-port power control
  dynamically.  There's also a raft of gadget driver updates and fixes,
  CONFIG_USB_DEBUG is finally gone now that everything has been
  converted over to the dynamic debug inteface, the last hold-out
  drivers were cleaned up and the config option removed.  There were
  also other minor things all through the drivers/usb/ tree, the
  shortlog shows this pretty well.

  All have been in linux-next, including the very last patch, which came
  from linux-next to fix a build issue on some platforms"

* tag 'usb-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (314 commits)
  usb: hub_handle_remote_wakeup() only exists for CONFIG_PM=y
  USB: orinoco_usb: remove CONFIG_USB_DEBUG support
  USB: media: lirc: igorplugusb: remove CONFIG_USB_DEBUG support
  USB: media: streamzap: remove CONFIG_USB_DEBUG
  USB: media: redrat3: remove CONFIG_USB_DEBUG usage
  USB: media: redrat3: remove unneeded tracing macro
  usb: qcserial: add additional Sierra Wireless QMI devices
  usb: host: max3421-hcd: Use module_spi_driver
  usb: host: max3421-hcd: Allow platform-data to specify Vbus polarity
  usb: host: max3421-hcd: fix "spi_rd8" uses dynamic stack allocation warning
  usb: host: max3421-hcd: Fix missing unlock in max3421_urb_enqueue()
  usb: qcserial: add Netgear AirCard 341U
  Documentation: dt-bindings: update xhci-platform DT binding for R-Car H2 and M2
  usb: host: xhci-plat: add xhci_plat_start()
  usb: host: max3421-hcd: Fix potential NULL urb dereference
  Revert "usb: gadget: net2280: Add support for PLX USB338X"
  USB: usbip: remove CONFIG_USB_DEBUG reference
  USB: remove CONFIG_USB_DEBUG from defconfig files
  usb: resume child device when port is powered on
  usb: hub_handle_remote_wakeup() depends on CONFIG_PM_RUNTIME=y
  ...
2014-06-03 09:11:20 -07:00
Greg Kroah-Hartman cf24df6061 USB: media: lirc: igorplugusb: remove CONFIG_USB_DEBUG support
The config option is gone, so port the driver over to using the dynamic
debug infrastructure instead, like all other USB drivers.

Cc: Jarod Wilson <jarod@wilsonet.com>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Cc: Matina Maria Trompouki <mtrompou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-29 11:22:47 -07:00
Paul Bolle 3746cfb684 staging: lirc: remove checks for CONFIG_LIRC_SERIAL_NSLU2
When support for homebrew serial port receivers was added in v2.6.36 its
code contained checks for CONFIG_LIRC_SERIAL_NSLU2. The related Kconfig
symbol didn't exist then. It still doesn't exist now. Remove these checks.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 20:19:26 -07:00
Paul Bolle 31789538e3 staging: go7007: remove reference to CONFIG_KMOD
The Kconfig symbol KMOD was removed in v2.6.29. Remove CONFIG_KMOD from
this list of options too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-05-27 00:42:51 +02:00
Peter Senna Tschudin 444f8bda81 [media] USB: as102_usb_drv.c: Remove useless return variables
This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Verified by compilation only.

The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
- return ret;
+ return C;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-25 17:39:19 -03:00
Tuomas Tynkkynen 465b8229ac [media] staging: lirc: Fix sparse warnings
Fix sparse warnings by adding __user and __iomem annotations where
necessary and removing certain unnecessary casts. While at it,
also use u32 in place of __u32.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-25 16:02:03 -03:00
Laurent Pinchart 0eda185c6c [media] media: staging: davinci: vpfe: Switch to pad-level DV operations
The video-level enum_dv_timings and dv_timings_cap operations are
deprecated in favor of the pad-level versions. All subdev drivers
implement the pad-level versions, switch to them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-25 12:43:10 -03:00
Ismael Luceno 523d63eb67 [media] solo6x10: Kconfig: Add supported card list to the SOLO6X10 knob
Explicitly list the cards supported by and tested with this driver.

Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-25 12:33:30 -03:00
Ismael Luceno 3a4d339fe8 [media] solo6x10: Reduce OSD writes to the minimum necessary
Instead of unconditionally writing SOLO_EOSD_EXT_SIZE() bytes to the OSD
area (which is 64 or 128 kB depending on the PCI board) we only
write the actual amount of data needed which is 16 * OSD_TEXT_MAX (= 16 * 44).

Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-25 12:33:07 -03:00
Laurent Pinchart fbac1400bd [media] omap3isp: Move to videobuf2
Replace the custom buffers queue implementation with a videobuf2 queue.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-25 11:38:53 -03:00
Laurent Pinchart 8774bed9ce [media] v4l: subdev: Move [gs]_std operation to video ops
The g_std and s_std operations are video-related, move them to the video
ops where they belong.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-24 17:11:26 -03:00
Dan Carpenter 5b340ea0ca [media] Staging: dt3155v4l: set error code on failure
We should be returning -ENOMEM here instead of success.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 19:48:28 -03:00
Vitaly Osipov 6ee51a27b2 [media] staging: media: omap24xx: use pr_info() instead of KERN_INFO
tcm825x.c:

changed printk to pr_info

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:54:53 -03:00
Vitaly Osipov e6659ee6e9 [media] staging: media: omap24xx: fix up checkpatch error message
tcm825x.c:

fixing ERROR: Macros with complex values should be enclosed in parenthesis

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:54:27 -03:00
Pali Rohár 5d60122b7e [media] radio-bcm2048: fix wrong overflow check
This patch fixes an off by one check in bcm2048_set_region().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:17:21 -03:00
Jinqiang Zeng cd6ff5c2df [media] fix the code style errors in sn9c102
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:16:03 -03:00
Laurent Pinchart fa7014f569 [media] omap4iss: Relax usleep ranges
Allow the system to merge CPU wakeups by specifying different minimum
and maximum usleep values.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:03:18 -03:00
Laurent Pinchart 05b1b986b5 [media] omap4iss: Use a common macro for all sleep-based poll loops
Instead of implementing usleep_range-based poll loops manually (and
slightly differently), create a generic iss_poll_wait_timeout() macro
and use it through the driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:02:57 -03:00
Laurent Pinchart 47a963f102 [media] omap4iss: Add missing white space
The error was reported by checkpatch.pl. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:01:05 -03:00
Laurent Pinchart d14cb130f3 [media] omap4iss: Don't check for DEBUG when printing IRQ debugging messages
Now that the VIDEO_OMAP4_DEBUG Kconfig option has been removed in favour
of dynamic printk, the DEBUG macro isn't defined anymore. Don't check
for it to guard IRQ debugging messages compilation, as they're already
guarded by the ISS_ISR_DEBUG macro.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:00:45 -03:00
Paul Bolle 2e509dddc4 [media] omap4iss: Remove VIDEO_OMAP4_DEBUG Kconfig option
The option was supposed to control the definition of the DEBUG macro in
the Makefile but has been left unused by mistake. Given that debugging
should be enabled using dynamic printk, remote the Kconfig option.

[Reworked the commit message]

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 11:52:08 -03:00
Tuomas Tynkkynen 12a7208386 staging: lirc: Fix sparse warnings
Fix sparse warnings by adding __user and __iomem annotations where
necessary and removing certain unnecessary casts. While at it,
also use u32 in place of __u32.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23 21:39:28 +09:00
Pali Rohár 43322faf5f radio-bcm2048.c: fix wrong overflow check
This patch fixes an off by one check in bcm2048_set_region().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-05-05 15:34:08 +02:00
Hans Verkuil e37559b22c [media] vb2: stop_streaming should return void
The vb2 core ignores any return code from the stop_streaming op.
And there really isn't anything it can do anyway in case of an error.
So change the return type to void and update any drivers that implement it.

The int return gave drivers the idea that this operation could actually
fail, but that's really not the case.

The pwc amd sdr-msi3101 drivers both had this construction:

        if (mutex_lock_interruptible(&s->v4l2_lock))
                return -ERESTARTSYS;

This has been updated to just call mutex_lock(). The stop_streaming op
expects this to really stop streaming and I very much doubt this will
work reliably if stop_streaming just returns without really stopping the
DMA.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-23 10:12:51 -03:00
Lad, Prabhakar 8f7402a304 [media] staging: media: davinci: vpfe: release buffers in case start_streaming call back fails
this patch releases the buffer by calling vb2_buffer_done(),
with state marked as VB2_BUF_STATE_QUEUED if start_streaming()
call back fails.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-16 18:26:47 -03:00
Lad, Prabhakar 933fd6e57d [media] staging: media: davinci: vpfe: use v4l2_fh for priority handling
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-16 18:26:03 -03:00
Mike Sampson 07002c05c3 [media] sn9c102_hv7131r: fix style warnings flagged by checkpatch.pl
Signed-off-by: Mike Sampson <mike@sambodata.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-16 18:25:27 -03:00
ileana@telecom-paristech.fr 576f7d3487 [media] staging: omap24xx: fix coding style
Fix missing parentheses in macros
Errors found by checkpatch.pl

Signed-off-by: Ioana Ileana <ileana@enst.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-16 18:21:19 -03:00
Jean Delvare 877ed14306 [media] Prefer gspca_sonixb over sn9c102 for all devices
The sn9c102 driver is deprecated. It was moved to staging in
anticipation of its removal in a future kernel version. However, USB
devices 0C45:6024 and 0C45:6025 are still handled by sn9c102 when
both sn9c102 and gspca_sonixb are enabled.

We must migrate all the users of these devices to the gspca_sonixb
driver now, so that it gets sufficient testing before the sn9c102
driver is finally phased out.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-15 09:59:31 -03:00
Lad, Prabhakar d891ae5ef1 [media] staging: media: davinci: vpfe: make sure all the buffers are released
from commit-id: b3379c6201
"vb2: only call start_streaming if sufficient buffers are queued"
the vb2 framework warns on (WARN_ON()) if all the active buffers
are not released when streaming is stopped, initially the vb2 silently
released the buffer internally if the buffer was not released by
the driver.

This patch fixes following issue:

WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:2011 __vb2_queue_cancel+0x1a0/0x218()
Modules linked in:
CPU: 0 PID: 2049 Comm: vpfe_video Tainted: G        W    3.14.0-rc5-00414-ged97a6f #89
[<c000e3f0>] (unwind_backtrace) from [<c000c618>] (show_stack+0x10/0x14)
[<c000c618>] (show_stack) from [<c001adb0>] (warn_slowpath_common+0x68/0x88)
[<c001adb0>] (warn_slowpath_common) from [<c001adec>] (warn_slowpath_null+0x1c/0x24)
[<c001adec>] (warn_slowpath_null) from [<c0252e0c>] (__vb2_queue_cancel+0x1a0/0x218)
[<c0252e0c>] (__vb2_queue_cancel) from [<c02533a4>] (vb2_queue_release+0x14/0x24)
[<c02533a4>] (vb2_queue_release) from [<c025a65c>] (vpfe_release+0x60/0x230)
[<c025a65c>] (vpfe_release) from [<c023fe5c>] (v4l2_release+0x34/0x74)
[<c023fe5c>] (v4l2_release) from [<c00b4a00>] (__fput+0x80/0x224)
[<c00b4a00>] (__fput) from [<c00341e8>] (task_work_run+0xa0/0xd0)
[<c00341e8>] (task_work_run) from [<c001cc28>] (do_exit+0x244/0x918)
[<c001cc28>] (do_exit) from [<c001d344>] (do_group_exit+0x48/0xdc)
[<c001d344>] (do_group_exit) from [<c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
[<c0029894>] (get_signal_to_deliver) from [<c000b888>] (do_signal+0x78/0x3a0)
[<c000b888>] (do_signal) from [<c000bc54>] (do_work_pending+0xa4/0xb4)
[<c000bc54>] (do_work_pending) from [<c00096dc>] (work_pending+0xc/0x20)
---[ end trace 5faa75e8c2f8a6a1 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:1095 vb2_buffer_done+0x1e0/0x224()
Modules linked in:
CPU: 0 PID: 2049 Comm: vpfe_video Tainted: G        W    3.14.0-rc5-00414-ged97a6f #89
[<c000e3f0>] (unwind_backtrace) from [<c000c618>] (show_stack+0x10/0x14)
[<c000c618>] (show_stack) from [<c001adb0>] (warn_slowpath_common+0x68/0x88)
[<c001adb0>] (warn_slowpath_common) from [<c001adec>] (warn_slowpath_null+0x1c/0x24)
[<c001adec>] (warn_slowpath_null) from [<c0252c28>] (vb2_buffer_done+0x1e0/0x224)
[<c0252c28>] (vb2_buffer_done) from [<c0252e3c>] (__vb2_queue_cancel+0x1d0/0x218)
[<c0252e3c>] (__vb2_queue_cancel) from [<c02533a4>] (vb2_queue_release+0x14/0x24)
[<c02533a4>] (vb2_queue_release) from [<c025a65c>] (vpfe_release+0x60/0x230)
[<c025a65c>] (vpfe_release) from [<c023fe5c>] (v4l2_release+0x34/0x74)
[<c023fe5c>] (v4l2_release) from [<c00b4a00>] (__fput+0x80/0x224)
[<c00b4a00>] (__fput) from [<c00341e8>] (task_work_run+0xa0/0xd0)
[<c00341e8>] (task_work_run) from [<c001cc28>] (do_exit+0x244/0x918)
[<c001cc28>] (do_exit) from [<c001d344>] (do_group_exit+0x48/0xdc)
[<c001d344>] (do_group_exit) from [<c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
[<c0029894>] (get_signal_to_deliver) from [<c000b888>] (do_signal+0x78/0x3a0)
[<c000b888>] (do_signal) from [<c000bc54>] (do_work_pending+0xa4/0xb4)
[<c000bc54>] (do_work_pending) from [<c00096dc>] (work_pending+0xc/0x20)
---[ end trace 5faa75e8c2f8a6a2 ]---

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-15 09:54:28 -03:00
Antti Palosaari cf2a320e1f [media] msi3101: check I/O return values on stop streaming
Coverity CID 1196496: Unchecked return value (CHECKED_RETURN)

Calling "msi3101_ctrl_msg" without checking return value (as is done
elsewhere 8 out of 10 times).

Reported-by: <scan-admin@coverity.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-06 11:08:19 -03:00
Antti Palosaari 11da6ed691 [media] msi3101: remove unused variable assignment
Coverity CID 1196508: Unused pointer value (UNUSED_VALUE)
Pointer "bandwidth" returned by "v4l2_ctrl_find(&s->hdl, 10619148U)"
is overwritten.

Reported-by: <scan-admin@coverity.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-06 11:07:59 -03:00
Antti Palosaari 82932d4cff [media] msi001: fix possible integer overflow
Coverity CID 1196502: Unintentional integer overflow
(OVERFLOW_BEFORE_WIDEN)

Potentially overflowing expression "(f_rf + f_if + f_if1) * lo_div"
with type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit
arithmetic before being used in a context which expects an expression
of type "u64" (64 bits, unsigned). To avoid overflow, cast either
operand to "u64" before performing the multiplication.

Reported-by: <scan-admin@coverity.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-06 11:07:45 -03:00
Linus Torvalds 3c83e61e67 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
 "The main set of series of patches for media subsystem, including:
   - document RC sysfs class
   - added an API to setup scancode to allow waking up systems using the
     Remote Controller
   - add API for SDR devices.  Drivers are still on staging
   - some API improvements for getting EDID data from media
     inputs/outputs
   - new DVB frontend driver for drx-j (ATSC)
   - one driver (it913x/it9137) got removed, in favor of an improvement
     on another driver (af9035)
   - added a skeleton V4L2 PCI driver at documentation
   - added a dual flash driver (lm3646)
   - added a new IR driver (img-ir)
   - added an IR scancode decoder for the Sharp protocol
   - some improvements at the usbtv driver, to allow its core to be
     reused.
   - added a new SDR driver (rtl2832u_sdr)
   - added a new tuner driver (msi001)
   - several improvements at em28xx driver to fix PM support, device
     removal and to split the V4L2 specific bits into a separate
     sub-driver
   - one driver got converted to videobuf2 (s2255drv)
   - the e4000 tuner driver now follows an improved binding model
   - some fixes at V4L2 compat32 code
   - several fixes and enhancements at videobuf2 code
   - some cleanups at V4L2 API documentation
   - usual driver enhancements, new board additions and misc fixups"

[ NOTE! This merge effective drops commit 4329b93b28 ("of: Reduce
  indentation in of_graph_get_next_endpoint").

  The of_graph_get_next_endpoint() function was moved and renamed by
  commit fd9fdb78a9 ("[media] of: move graph helpers from
  drivers/media/v4l2-core to drivers/of").  It was originally called
  v4l2_of_get_next_endpoint() and lived in the file
  drivers/media/v4l2-core/v4l2-of.c.

  In that original location, it was then fixed to support empty port
  nodes by commit b9db140c1e ("[media] v4l: of: Support empty port
  nodes"), and that commit clashes badly with the dropped "Reduce
  intendation" commit.  I had to choose one or the other, and decided
  that the "Support empty port nodes" commit was more important ]

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (426 commits)
  [media] em28xx-dvb: fix PCTV 461e tuner I2C binding
  Revert "[media] em28xx-dvb: fix PCTV 461e tuner I2C binding"
  [media] em28xx: fix PCTV 290e LNA oops
  [media] em28xx-dvb: fix PCTV 461e tuner I2C binding
  [media] m88ds3103: fix bug on .set_tone()
  [media] saa7134: fix WARN_ON during resume
  [media] v4l2-dv-timings: add module name, description, license
  [media] videodev2.h: add parenthesis around macro arguments
  [media] saa6752hs: depends on CRC32
  [media] si4713: fix Kconfig dependencies
  [media] Sensoray 2255 uses videobuf2
  [media] adv7180: free an interrupt on failure paths in init_device()
  [media] e4000: make VIDEO_V4L2 dependency optional
  [media] af9033: Don't export functions for the hardware filter
  [media] af9035: use af9033 PID filters
  [media] af9033: implement PID filter
  [media] rtl2832_sdr: do not use dynamic stack allocation
  [media] e4000: fix 32-bit build error
  [media] em28xx-audio: make sure audio is unmuted on open()
  [media] DocBook media: v4l2_format_sdr was renamed to v4l2_sdr_format
  ...
2014-04-04 09:50:07 -07:00
Linus Torvalds 159d8133d0 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree updates from Jiri Kosina:
 "Usual rocket science -- mostly documentation and comment updates"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
  sparse: fix comment
  doc: fix double words
  isdn: capi: fix "CAPI_VERSION" comment
  doc: DocBook: Fix typos in xml and template file
  Bluetooth: add module name for btwilink
  driver core: unexport static function create_syslog_header
  mmc: core: typo fix in printk specifier
  ARM: spear: clean up editing mistake
  net-sysfs: fix comment typo 'CONFIG_SYFS'
  doc: Insert MODULE_ in module-signing macros
  Documentation: update URL to hfsplus Technote 1150
  gpio: update path to documentation
  ixgbe: Fix format string in ixgbe_fcoe.
  Kconfig: Remove useless "default N" lines
  user_namespace.c: Remove duplicated word in comment
  CREDITS: fix formatting
  treewide: Fix typo in Documentation/DocBook
  mm: Fix warning on make htmldocs caused by slab.c
  ata: ata-samsung_cf: cleanup in header file
  idr: remove unused prototype of idr_free()
2014-04-02 16:23:38 -07:00
Linus Torvalds c12e69c6aa Staging driver pull request for 3.15-rc1
Here's the huge drivers/staging/ update for 3.15-rc1.
 
 Loads of cleanup fixes, a few drivers removed, and some new ones added.
 
 All have been in linux-next for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iEYEABECAAYFAlM7BqAACgkQMUfUDdst+ykHUwCguJDlvM7/FGb3QQslAuKN5Np4
 n2YAoJ3C355mo8Wxr/bJah3Jms4f+a7Q
 =4XGY
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver updates from Greg KH:
 "Here's the huge drivers/staging/ update for 3.15-rc1.

  Loads of cleanup fixes, a few drivers removed, and some new ones
  added.

  All have been in linux-next for a while"

* tag 'staging-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1375 commits)
  staging: xillybus: XILLYBUS_PCIE depends on PCI_MSI
  staging: xillybus: Added "select CRC32" for XILLYBUS in Kconfig
  staging: comedi: poc: remove obsolete driver
  staging: unisys: replace kzalloc/kfree with UISMALLOC/UISFREE
  staging: octeon-usb: prevent memory corruption
  staging: usbip: fix line over 80 characters
  staging: usbip: fix quoted string split across lines
  Staging: unisys: Remove RETINT macro
  Staging: unisys: Remove FAIL macro
  Staging: unisys: Remove RETVOID macro
  Staging: unisys: Remove RETPTR macro
  Staging: unisys: Remove RETBOOL macro
  Staging: unisys: Remove FAIL_WPOSTCODE_1 macro
  Staging: unisys: Cleanup macros to get rid of goto statements
  Staging: unisys: include: Remove unused macros from timskmod.h
  staging: dgap: fix the rest of the checkpatch warnings in dgap.c
  Staging: bcm: Remove unnecessary parentheses
  staging: wlags49_h2: Delete unnecessary braces
  staging: wlags49_h2: Do not use assignment in if condition
  staging: wlags49_h2: Enclose macro in a do-while loop
  ...
2014-04-01 16:45:00 -07:00
Aybuke Ozdemir a0ecdf0695 staging/media/davinci_vpfe/vpfe_video.h Unnecessary space after function pointer name
Fix checkpatch.pl issues with Unnecessary space after function pointer
name in vpfe_video.h

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 13:50:24 -07:00
Aybuke Ozdemir 76924d0699 staging/media/davinci_vpfe/vpfe_video.h Fix missing space after return type
Fix checkpatch.pl issues with
missing space after return type in /vpfe_video.h

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 13:50:24 -07:00
Aybuke Ozdemir 8e3a3ce66e staging: as102: as10x_handle.h .Fix Unnecessary space after function pointer name
This patch removes the following checkpatch.pl warning in as10x_handle.h
Warning : Unnecessary space after function pointer name

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 13:41:27 -07:00
Andreea-Cristina Bernat 4f4c965212 Staging: lirc: Fix warning: assignment of bool to 0/1
This patch solves the warning "Assignment of bool to 0/1"

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 12:19:32 -07:00
Aybuke Ozdemir da54e4a520 staging: media: omap24xx: tcm825x.c Fix that open brace { should be on the previous line
The patch fixes the following checkpatch.pl errors:
ERROR: that open brace { should be on the previous line.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:04:45 -07:00
Chi Pham 86a7dacc8f staging:media: Removed assignments from if statements.
The following coccinelle script found the match:

@simple@
expression E1, E2;
statement S1, S2;
@@

+ E1 = E2;
if (
- (E1 = E2)
+ E1
 )
S1 else S2

@left@
expression E0, E1, E2;
statement S0, S1;
@@
- if ((E1 = E2) < E0)
+ E1 = E2;
+ if (E1 < E0)
S1

Signed-off-by: Chi Pham <fempsci@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:03:50 -07:00
Uma Sharma 3e1e788341 staging: media/omap24xx/tcm825x.h removed warning
This patch removes the following checkpatch.pl warning in tcm825x.h
Warning : missing space after return type

Signed-off-by: Uma Sharma <uma.sharma523@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:32:58 -07:00
Uma Sharma 6e878c0299 staging: media/msi3101/sdr-msi3101.c removed warning
This patch removes the following checkpatch.pl warning in sdr-msi3101.c
Warning : Unnecessary space after function pointer name

Signed-off-by: Uma Sharma <uma.sharma523@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:32:51 -07:00
Aybuke Ozdemir 5935caec8c staging: go7007: go7007-v4l2.c Fix line over 80 characters.
Fix checkpatch.pl issues with line over
80 characters in go7007-v4l2.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:19:14 -07:00
Kristina Martšenko 5ae7437ead staging: dt3155v4l: make q_ops static
Since q_ops is only referenced in dt3155v4l.c, mark it as static.

This removes the following sparse warning:
drivers/staging/media/dt3155v4l//dt3155v4l.c:302:22: warning: symbol 'q_ops' was not declared. Should it be static?

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:27:48 -07:00
Andreea-Cristina Bernat 0cb6dfd710 Staging: solo6x10: Replace expressions that don't use ALIGN macro
There are some expressions that compute the roundup of a number, but don't use
the existing macro defined in /include/kernel.h. This patch uses the following
Coccinelle semantic patch:
@ haskernel @
@@

@ depends on haskernel @
expression E1, E2;
@@

- (E1 + (E2 - 1)) & ~(E2 - 1)
+ ALIGN(E1, E2)

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:00:56 -07:00
Aybuke Ozdemir fa91783ec0 staging: solo6x10: solo6x10-v4l2-enc.c: Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in solo6x10-v4l2-enc.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:07:06 -07:00
Antti Palosaari 02b7220017 [media] rtl2832_sdr: do not use dynamic stack allocation
Do not use dynamic stack allocation.

>> drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c:181:1:
warning: 'rtl2832_sdr_wr' uses dynamic stack allocation [enabled by default]

Reported-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14 20:23:23 -03:00
Antti Palosaari ea4d04f92c [media] rtl2832_sdr: clamp bandwidth to nearest legal value in automode
Clamp bandwidth to nearest legal value in automode in order to pass
v4l2-compliance test.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14 05:39:58 -03:00
Hans Verkuil bc9087549e [media] rtl2832_sdr: fixing v4l2-compliance issues
Fix rtl2832_sdr driver v4l2-compliance issues.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14 05:39:23 -03:00
Antti Palosaari 09143009d4 [media] rtl2832_sdr: expose e4000 controls to user
E4000 tuner driver provides now some controls. Expose those to
userland.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14 05:32:18 -03:00
Antti Palosaari 771138920e [media] rtl2832_sdr: Realtek RTL2832 SDR driver module
Implement SDR driver for Realtek RTL2832U chip as a DVB extension
module. SDR module is attached by DVB USB RTL28XXU driver as a DVB
SEC (satellite equipment controller) module. Abusing unused SEC here
has no harm as that is DVB-T only frontend.

SDR functionality is provided by RTL2832 DVB-T demodulator. I suspect
it is originally planned for DAB and FM, but it could be abused general
SDR, due to modern silicon tuners that has wide frequency range and a
lot of configurable parameters (filters, gains, ...).

http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/44461

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14 05:32:05 -03:00
Andreea-Cristina Bernat 5a9e30eec8 staging: lirc: Add fallthrough comment
This patch adds fallthrough comments for the cases not preceded by
break or fallthrough comment

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 17:37:23 -07:00
Andreea-Cristina Bernat 17e65fbbe2 staging/media/solo6x10: Fix coding-style error
This patch fixes the error "space required after that ';'" for
the file /drivers/staging/media/solo6x10/solo6x10-tx28.c

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:21:12 -07:00
Antti Palosaari c350912c8b [media] msi3101: fix v4l2-compliance issues
Fix msi3101 driver v4l2-compliance issues.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-13 10:59:15 -03:00
Antti Palosaari 952a70aa68 [media] msi001: fix v4l2-compliance issues
Fix msi001 driver v4l2-compliance issues.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-13 10:58:54 -03:00
Antti Palosaari d287e4e31e [media] msi3101: clamp mmap buffers to reasonable level
That value is coming from the user and we need only ensure it is
reasonable. That was pointed by Hans when reviewing rtl2832_sdr driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-13 10:26:53 -03:00
Antti Palosaari 2e68f841a5 [media] msi3101: use msi001 tuner driver
Remove MSi001 RF tuner related code as MSi001 functionality is moved
to own driver.

Implement SPI master adapter.

Attach MSi001 driver via SPI / V4L subdev framework.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-13 10:26:51 -03:00
Antti Palosaari 93203dd6c7 [media] msi001: Mirics MSi001 silicon tuner driver
That RF tuner driver is bound via SPI bus model and it implements V4L
subdev API. I split it out from MSi3101 SDR driver.
MSi3101 = MSi2500 + MSi001.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-13 10:26:50 -03:00
Antti Palosaari 3d0c8fa3c5 [media] msi3101: convert to SDR API
Massive rewrite. Use SDR API. Fix bugs.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-13 10:26:49 -03:00
Jon Mason 6fb0e403e4 [media] staging/dt3155v4l: use PCI_VENDOR_ID_INTEL
Use PCI_VENDOR_ID_INTEL instead of creating its own vendor ID #define.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11 09:26:53 -03:00
Hans Verkuil b3379c6201 [media] vb2: only call start_streaming if sufficient buffers are queued
In commit 02f142ecd2 support was added to
start_streaming to return -ENOBUFS if insufficient buffers were queued
for the DMA engine to start. The vb2 core would attempt calling
start_streaming again if another buffer would be queued up.

Later analysis uncovered problems with the queue management if start_streaming
would return an error: the buffers are enqueued to the driver before the
start_streaming op is called, so after an error they are never returned to
the vb2 core. The solution for this is to let the driver return them to
the vb2 core in case of an error while starting the DMA engine. However,
in the case of -ENOBUFS that would be weird: it is not a real error, it
just says that more buffers are needed. Requiring start_streaming to give
them back only to have them requeued again the next time the application
calls QBUF is inefficient.

This patch changes this mechanism: it adds a 'min_buffers_needed' field
to vb2_queue that drivers can set with the minimum number of buffers
required to start the DMA engine. The start_streaming op is only called
if enough buffers are queued. The -ENOBUFS handling has been dropped in
favor of this new method.

Drivers are expected to return buffers back to vb2 core with state QUEUED
if start_streaming would return an error. The vb2 core checks for this
and produces a warning if that didn't happen and it will forcefully
reclaim such buffers to ensure that the internal vb2 core state remains
consistent and all buffer-related resources have been correctly freed
and all op calls have been balanced.

__reqbufs() has been updated to check that at least min_buffers_needed
buffers could be allocated. If fewer buffers were allocated then __reqbufs
will free what was allocated and return -ENOMEM. Based on a suggestion from
Pawel Osciak.

__create_bufs() doesn't do that check, since the use of __create_bufs
assumes some advance scenario where the user might want more control.
Instead streamon will check if enough buffers were allocated to prevent
streaming with fewer than the minimum required number of buffers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11 06:56:41 -03:00
Hans Verkuil 0647064293 [media] vb2: change result code of buf_finish to void
The buf_finish op should always work, so change the return type to void.
Update the few drivers that use it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Reviewed-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11 06:56:38 -03:00
Mauro Carvalho Chehab c897df0e2d Linux 3.14-rc5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJTE+9XAAoJEHm+PkMAQRiGrMQIAKI2V49Kj8WlnwGchFvsbGJB
 SLALwNi33T/IBKdZRhrfryBu02Zj7eVvZ2ML35dJEnmF88O+dJBDMTkKV1xalrip
 mtkBrjUnfAI04fq/daLQ1TsAy4qqlra5tSTuDCw8ILOnGPwT0VydIEHNdtmoUIfw
 xlZLxHzny1MslZ78d7uR/cUnV9ylKRRajWzfw1HT8hL51fCt8nRWY0sCvwvl+kMJ
 LsK+6I7mHDUuzA7QBmBI+dhzQgos5+JkkrnpmqHAqwmIh+AI3ksmjUCQ4dM7owrO
 IvEx+ZNDqxAdLcm1WAxATNfxddFXHc62JTvKuuKqTVWuaxVfK1Aqt8MjDMIPeAQ=
 =yV5u
 -----END PGP SIGNATURE-----

Merge tag 'v3.14-rc5' into patchwork

Linux 3.14-rc5

* tag 'v3.14-rc5': (1117 commits)
  Linux 3.14-rc5
  drm/vmwgfx: avoid null pointer dereference at failure paths
  drm/vmwgfx: Make sure backing mobs are cleared when allocated. Update driver date.
  drm/vmwgfx: Remove some unused surface formats
  MAINTAINERS: add maintainer entry for Armada DRM driver
  arm64: Fix !CONFIG_SMP kernel build
  arm64: mm: Add double logical invert to pte accessors
  dm cache: fix truncation bug when mapping I/O to >2TB fast device
  perf tools: Fix strict alias issue for find_first_bit
  powerpc/powernv: Fix indirect XSCOM unmangling
  powerpc/powernv: Fix opal_xscom_{read,write} prototype
  powerpc/powernv: Refactor PHB diag-data dump
  powerpc/powernv: Dump PHB diag-data immediately
  powerpc: Increase stack redzone for 64-bit userspace to 512 bytes
  powerpc/ftrace: bugfix for test_24bit_addr
  powerpc/crashdump : Fix page frame number check in copy_oldmem_page
  powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly
  kvm, vmx: Really fix lazy FPU on nested guest
  perf tools: fix BFD detection on opensuse
  drm/radeon: enable speaker allocation setup on dce3.2
  ...
2014-03-11 06:55:49 -03:00
Ebru Akagunduz ee3a636674 Staging:media: Fix Sparse warnings incorrect type in lirc_sasem.c
This patch fixes following sparse warning in dgap.c
drivers/staging/media/lirc/lirc_sasem.c:392:32: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/media/lirc/lirc_sasem.c:392:32:    expected void const [noderef] <asn:1>*<noident>
drivers/staging/media/lirc/lirc_sasem.c:392:32:    got char const *buf
drivers/staging/media/lirc/lirc_sasem.c:123:28: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
drivers/staging/media/lirc/lirc_sasem.c:123:28:    expected int ( *write )( ... )
drivers/staging/media/lirc/lirc_sasem.c:123:28:    got int ( static [toplevel] *<noident> )( ... )

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07 13:20:48 -08:00
Ebru Akagunduz 04ad3a644e Staging:media: Fix Sparse Warnings "symbol was not declared. Should it be static?"
This patch fixes the Sparse Warnings "symbol was
not declared. Should it be static?"

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07 13:14:15 -08:00
Monam Agarwal 4fe130f2a4 Staging: media/cxd2099: Fix line length over 80 characters
This patch fixes the following checkpatch.pl issues in cxd2099.c
WARNING: line length over 80 characters

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07 13:14:14 -08:00
Himangi Saraogi 41df49e0ca staging:media: remove assignment in if condition
This patch removes the assignment in if conditions to do away with the
checkpatch warning :'do not use assignment in if condition'.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07 13:14:14 -08:00
Sakari Ailus ade48681f1 [media] v4l: Rename vb2_queue.timestamp_type as timestamp_flags
The timestamp_type field used to contain only the timestamp type. Soon it
will be used for timestamp source flags as well. Rename the field
accordingly.

[m.chehab@samsung.com: do the change also to drivers/staging/media and at s2255]
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-05 16:34:14 -03:00
Michael Opdenacker 381d0a40a4 [media] davinci: vpfe: remove deprecated IRQF_DISABLED
This patch proposes to remove the use of the IRQF_DISABLED flag

It's a NOOP since 2.6.35 and it will be removed one day.

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-28 13:36:56 -03:00
Levente Kurusa 57802c5261 [media] staging: davinci_vpfe: fix error check
The check would check the pointer, which is never less than 0.
According to the error message, the correct check would be
to check the return value of ipipe_mode. Check that instead.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Levente Kurusa <levex@linux.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-28 13:36:28 -03:00
Takashi Iwai d01a838c86 Merge branch 'for-linus' into HEAD 2014-02-25 12:12:17 +01:00
Jiri Kosina d4263348f7 Merge branch 'master' into for-next 2014-02-20 14:54:28 +01:00
Paul Bolle c7dcec7dd4 Kconfig: Remove useless "default N" lines
A number of Kconfig entries default to (uppercase) "N". It was clearly
intended to use "default n". But since (lowercase) "n" is the default
anyway, these lines might as well be removed.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-02-20 14:38:06 +01:00
Takashi Iwai 3a3d2afd08 staging/media: Convert to snd_card_new() with a device pointer
Also remove superfluous snd_card_set_dev() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-14 08:14:11 +01:00
Alexey Khoroshilov 50c88544d2 [media] go7007-loader: fix usb_dev leak
There is usb_get_dev() in go7007_loader_probe(),
but there is no usb_put_dev() anywhere.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-04 06:28:00 -02:00
Linus Torvalds b399c46ea0 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
 - a new jpeg codec driver for Samsung Exynos (jpeg-hw-exynos4)
 - a new dvb frontend for ds2103 chipset (m88ds2103)
 - a new sensor driver for Samsung S5K5BAF UXGA (s5k5baf)
 - new drivers for R-Car VSP1
 - a new radio driver: radio-raremono
 - a new tuner driver for ts2022 chipset (m88ts2022)
 - the analog part of em28xx is now a separate module that only
   load/runs if the device is not a pure digital TV device
 - added a staging driver for bcm2048 radio devices
 - the omap 2 video driver (omap24xx) was moved to staging.  This driver
   is for an old hardware and uses a deprecated Kernel internal API.  If
   nobody cares enough to fix it, it would be removed on a couple Kernel
   releases
 - the sn9c102 driver was moved to staging.  This driver was replaced by
   gspca, and disabled on some distros, as almost all devices are known
   to work properly with gspca.  It should be removed from kernel on a
   couple Kernel releases
 - lots of driver fixes, improvements and cleanups

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (421 commits)
  [media] media: v4l2-dev: fix video device index assignment
  [media] rc-core: reuse device numbers
  [media] em28xx-cards: properly initialize the device bitmap
  [media] Staging: media: Fix line length exceeding 80 characters in as102_drv.c
  [media] Staging: media: Fix line length exceeding 80 characters in as102_fe.c
  [media] Staging: media: Fix quoted string split across line in as102_fe.c
  [media] media: st-rc: Add reset support
  [media] m2m-deinterlace: fix allocated struct type
  [media] radio-usb-si4713: fix sparse non static symbol warnings
  [media] em28xx-audio: remove needless check before usb_free_coherent()
  [media] au0828: Fix sparse non static symbol warning
  Revert "[media] go7007-usb: only use go->dev after allocated"
  [media] em28xx-audio: provide an error code when URB submit fails
  [media] em28xx: fix check for audio only usb interfaces when changing the usb alternate setting
  [media] em28xx: fix usb alternate setting for analog and digital video endpoints > 0
  [media] em28xx: make 'em28xx_ctrl_ops' static
  em28xx-alsa: Fix error patch for init/fini
  [media] em28xx-audio: flush work at .fini
  [media] drxk: remove the option to load firmware asynchronously
  [media] em28xx: adjust period size at runtime
  ...
2014-01-31 09:31:14 -08:00
Monam Agarwal f52e9828d5 [media] Staging: media: Fix line length exceeding 80 characters in as102_drv.c
This patch fixes the following checkpatch.pl warning in as102/as102_drv.c
WARNING: line over 80 characters in the file

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-15 11:45:58 -02:00
Monam Agarwal 15ddb513f2 [media] Staging: media: Fix line length exceeding 80 characters in as102_fe.c
This patch fixes the following checkpatch.pl issues in
as102/as102_fe.c
WARNING: line over 80 characters

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-15 11:45:49 -02:00
Monam Agarwal caabb84066 [media] Staging: media: Fix quoted string split across line in as102_fe.c
This patch fixes the following checkpatch.pl issues in
as102/as102_fe.c
WARNING: quoted string split across lines

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-15 11:45:38 -02:00
Mauro Carvalho Chehab b464f6b68e Revert "[media] go7007-usb: only use go->dev after allocated"
This patch conflicts with commits 66a528c1c3, with also fixes the
bug and got merged on v3.13-rc2.

This reverts commit c61c3094a6.
2014-01-15 07:30:41 -02:00
Mauro Carvalho Chehab 986058e1ef [media] lirc_parallel: avoid name conflict on mn10300 arch
The "irq_handler" name is already defined there on a header
file:

/devel/v4l/temp/drivers/staging/media/lirc/lirc_parallel.c:223:13: error: conflicting types for ‘irq_handler’
 static void irq_handler(void *blah)
             ^
In file included from /devel/v4l/temp/arch/mn10300/include/asm/reset-regs.h:16:0,
                 from /devel/v4l/temp/arch/mn10300/include/asm/irq.h:18,
                 from /devel/v4l/temp/include/linux/irq.h:24,
                 from /devel/v4l/temp/arch/mn10300/include/asm/hardirq.h:16,
                 from /devel/v4l/temp/include/linux/preempt_mask.h:5,
                 from /devel/v4l/temp/include/linux/sched.h:25,
                 from /devel/v4l/temp/include/linux/utsname.h:5,
                 from /devel/v4l/temp/arch/mn10300/include/asm/elf.h:15,
                 from /devel/v4l/temp/include/linux/elf.h:4,
                 from /devel/v4l/temp/include/linux/module.h:14,
                 from /devel/v4l/temp/drivers/staging/media/lirc/lirc_parallel.c:29:
/devel/v4l/temp/arch/mn10300/include/asm/exceptions.h:107:24: note: previous declaration of ‘irq_handler’ was here
 extern asmlinkage void irq_handler(void);

/devel/v4l/patchwork/drivers/staging/media/lirc/lirc_serial.c:653:20: error: conflicting types for ‘irq_handler’
 static irqreturn_t irq_handler(int i, void *blah)
                    ^
In file included from /devel/v4l/patchwork/arch/mn10300/include/asm/reset-regs.h:16:0,
                 from /devel/v4l/patchwork/arch/mn10300/include/asm/irq.h:18,
                 from /devel/v4l/patchwork/include/linux/irq.h:24,
                 from /devel/v4l/patchwork/arch/mn10300/include/asm/hardirq.h:16,
                 from /devel/v4l/patchwork/include/linux/preempt_mask.h:5,
                 from /devel/v4l/patchwork/include/linux/sched.h:25,
                 from /devel/v4l/patchwork/include/linux/utsname.h:5,
                 from /devel/v4l/patchwork/arch/mn10300/include/asm/elf.h:15,
                 from /devel/v4l/patchwork/include/linux/elf.h:4,
                 from /devel/v4l/patchwork/include/linux/module.h:14,
                 from /devel/v4l/patchwork/drivers/staging/media/lirc/lirc_serial.c:53:
/devel/v4l/patchwork/arch/mn10300/include/asm/exceptions.h:107:24: note: previous declaration of ‘irq_handler’ was here
 extern asmlinkage void irq_handler(void);

So, rename it, to avoid namespace conflicts.

This patch fixes building media drivers with allyesconfig/almodconfig on
mn10300 arch.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-13 16:28:20 -02:00
Mauro Carvalho Chehab c61c3094a6 [media] go7007-usb: only use go->dev after allocated
Fixes those warnings:
	drivers/staging/media/go7007/go7007-usb.c: In function 'go7007_usb_probe':
	drivers/staging/media/go7007/go7007-usb.c:1060: warning: 'go' is used uninitialized in this function

While here, comment a code that will never run.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-13 16:28:17 -02:00
Hans Verkuil 429df502d4 [media] solo6x10: fix broken PAL support
The video_type was never set correctly for PAL: it's not a bool, instead
it is a register value.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: tomdev@freenet.de
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-13 11:21:56 -02:00
Alexey Khoroshilov cd19f7d3e3 [media] as102: fix leaks at failure paths in as102_usb_probe()
Failure handling is incomplete in as102_usb_probe().
The patch implements proper resource deallocations.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07 08:55:58 -02:00
Hans Verkuil 42f8f39e27 [media] [for,v3.14] sn9c102: fix build dependency
This driver should only build if MEDIA_USB_SUPPORT is set.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Jim Davis <jim.epost@gmail.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07 08:49:01 -02:00
Hans Verkuil e0a973423e [media] davinci-vpfe: fix compile error
The include for delay.h was missing.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07 08:02:51 -02:00
Fengguang Wu 12d1ee1f2d [media] fix coccinelle warnings
drivers/staging/media/bcm2048/radio-bcm2048.c:2255:3-4: Unneeded semicolon

 Removes unneeded semicolon.

Generated by: coccinelle/misc/semicolon.cocci

CC: Hans Verkuil <hans.verkuil@cisco.com>
CC: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07 08:01:11 -02:00
Fengguang Wu 65eccc7a88 [media] fix coccinelle warnings
drivers/staging/media/bcm2048/radio-bcm2048.c:2632:1-7: Replace memcpy with struct assignment
/c/kernel-tests/src/cocci/drivers/staging/media/bcm2048/radio-bcm2048.c:744:1-7: Replace memcpy with struct assignment
/c/kernel-tests/src/cocci/drivers/staging/media/bcm2048/radio-bcm2048.c:2360:3-9: Replace memcpy with struct assignment

Generated by: coccinelle/misc/memcpy-assign.cocci

CC: Hans Verkuil <hans.verkuil@cisco.com>
CC: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07 08:01:03 -02:00
Hans Verkuil 79aeb3f308 [media] vb2: return ENOBUFS in start_streaming in case of too few buffers
This works together with the retry_start_streaming mechanism to allow userspace
to start streaming even if not all required buffers have been queued.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07 07:13:49 -02:00
Wei Yongjun 66c5e59278 [media] radio-bcm2048: fix missing unlock on error in bcm2048_rds_fifo_receive()
Add the missing unlock before return from function bcm2048_rds_fifo_receive()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07 06:49:51 -02:00
Dan Carpenter f7d40eea8e [media] v4l: omap4iss: Restore irq flags correctly in omap4iss_video_buffer_next()
The spin_lock_irqsave() macro is not nestable.  The second call will
overwrite the first record of "flags" so the IRQs will not be enabled
correctly at the end of the function.

In the current code, this function is always called from the IRQ handler
so everything works fine and this fix doesn't change anything.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-02 15:53:01 -02:00
Dan Carpenter eaf95eeec4 [media] v4l: omap4iss: use snprintf() to make smatch happy
Smatch complains here because name is a 32 character buffer and we
adding the "OMAP4 ISS " prefix as well for a total of 42 characters.
The sd->name buffer can only hold 32 characters.  I've changed it to use
snprintf() to silence the overflow warning.

Also I have removed the call to strlcpy() which is a no-op.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-02 15:52:35 -02:00
Hans Verkuil a03636cb21 [media] omap24xx/tcm825x: move to staging for future removal
The omap24xx driver and the tcm825x sensor driver are the only two
remaining drivers to still use the old deprecated v4l2-int-device API.

Nobody maintains these drivers anymore. But unfortunately the v4l2-int-device
API is used by out-of-tree drivers (MXC platform). This is a very bad situation
since as long as this deprecated API stays in the kernel there is no reason for
those out-of-tree drivers to convert.

This patch moves v4l2-int-device and the two drivers that depend on it to
staging in preparation for their removal.

If someone would be interested in getting these drivers to work, then start with
this since it's not very far from the state where they used to work:

<URL:http://vihersipuli.retiisi.org.uk/cgi-bin/gitweb.cgi?p=~sailus/linux-omap/.git;a=summary>

The branch is n800-cam. Porting to up-to-date APIs can then be done. David
might have done some work in that area, so check with him first.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: David Cohen <dacohen@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-20 13:45:22 -02:00
Hans Verkuil b8da9d3aaf [media] sn9c102: prepare for removal by moving it to staging
During the last media summit meeting it was decided to move this driver to
staging as the first step to removing it altogether.

Most webcams covered by this driver are now supported by gspca. Nobody has the
hardware to convert the remaining devices to gspca.

This driver needs a major overhaul to have it conform to the latest frameworks
and compliancy tests.

Without hardware, however, this is next to impossible. Given the fact that
this driver seems to be pretty much unused (it has been removed from Fedora
several versions ago and nobody complained about that), we decided to drop
this driver.

This patch moves it to staging. Some time in 2014 we will drop it completely.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-20 13:41:36 -02:00
Lisa Nguyen 3e6e3b3d3d [media] staging: media: davinci_vpfe: Rewrite return statement in vpfe_video.c
Rewrite the return statement in vpfe_video.c. This will prevent
the checkpatch.pl script from generating a warning saying
to remove () from this particular return statement.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 06:28:13 -02:00
Lisa Nguyen c324981d3b [media] staging: media: davinci_vpfe: Remove spaces before semicolons
Remove unnecessary spaces before semicolons to meet kernel
coding style.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 06:27:59 -02:00
Paul Gortmaker 885a947e5b staging: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17 10:08:14 -08:00
Laurent Pinchart bea7791529 [media] v4l: omap4iss: resizer: Fix comment regarding bypass mode
The comment explaining the usage of the bypass bit is wrong, fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 09:05:47 -02:00
Laurent Pinchart 112da08512 [media] v4l: omap4iss: Cancel streaming when a fatal error occurs
When a fatal error that prevents any further video streaming occurs in a
pipeline, all queued buffers must be marked as erroneous and new buffers
must be prevented from being queued. Implement this behaviour with a new
omap4iss_pipeline_cancel_stream() function that can be used by
submodules to cancel streaming.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 09:05:32 -02:00
Laurent Pinchart 216814fb01 [media] v4l: omap4iss: csi2: Replace manual if statement with a subclk field
Instead of manually checking whether the CSI2 module is CSI2a or CSI2b
in order to select the right subclock to enable/disable, add a subclk
field to the iss_csi2 structure, initialize it with the corresponding
subclock value and use it at runtime.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 09:04:39 -02:00
Laurent Pinchart f3632ba850 [media] v4l: omap4iss: Reset the ISS when the pipeline can't be stopped
When a failure to stop a module in the pipeline is detected, the only
way to recover is to reset the ISS. However, as other users can be using
a different pipeline with other modules, the ISS can't be reset
synchronously with the error detection.
Keep track of modules that have failed to stop, and reset the ISS
accordingly when the last user releases the last reference to the ISS.
Refuse to start streaming on a pipeline that contains a crashed module,
as the hardware wouldn't work anyway.
Modify the omap4iss_pipeline_set_stream() function to record the new ISS
pipeline state only when no error occurs, except when stopping the
pipeline in which case the pipeline is still marked as stopped.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 09:03:51 -02:00
Laurent Pinchart af15d025ec [media] v4l: omap4iss: Enable/disabling the ISP interrupts globally
ISP interrupts are enabled/disabled when starting/stopping the IPIPEIF
or resizer. This doesn't permit using the two modules in separate
pipelines. Fix it by enabling/disabling the ISP interrupts at the same
time as the ISS interrupts, in the ISS device get/put operations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:03:33 -02:00
Laurent Pinchart 6016498f2b [media] v4l: omap4iss: Propagate stop timeouts from submodules to the driver core
Return an error from the s_stream handlers when stopping the stream
failed instead of just logging the error and ignoring it. While we're
at it, move the logging code from submodules to the driver code.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:02:54 -02:00
Laurent Pinchart 0b1d424966 [media] v4l: omap4iss: Add enum_fmt_vid_cap ioctl support
List the pixel formats compatible with the active format currently
configured on the connected pad.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:02:21 -02:00
Laurent Pinchart cc3c2ac291 [media] v4l: omap4iss: Make __iss_video_get_format() return a v4l2_mbus_framefmt
The function will be used by a caller that needs the media bus format
instead of the pixel format currently returned. Move the media bus
format to pixel format conversion to the existing caller.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:02:02 -02:00
Laurent Pinchart a1d4eab06d [media] v4l: omap4iss: Add description field to iss_format_info structure
The field stores the format description in a human-readable form.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:01:13 -02:00
Laurent Pinchart 3c4ee96b5f [media] v4l: omap4iss: Convert hexadecimal constants to lower case
The Linux kernel recommends lower case for hexadecimal constants.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:00:51 -02:00
Laurent Pinchart 82043ff6af [media] v4l: omap4iss: resizer: Stop the whole resizer to avoid FIFO overflows
When stopping the resizer due to a buffer underrun, disabling RZA only
produces input FIFO overflows, most probably when the next frame is
received. Disable the whole resizer to work around the problem.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:00:34 -02:00
Laurent Pinchart 97059524ba [media] v4l: omap4iss: csi: Create and use register access functions
Replace the direct readl/writel calls with helper functions.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:00:00 -02:00
Laurent Pinchart 11abbfd30f [media] v4l: omap4iss: Create and use register access functions
Replace the direct readl/writel calls with helper functions that take an
ISS pointer and compute the register memory address. Also add bit clear,
set and update helpers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:59:20 -02:00
Laurent Pinchart 1be9ba20e1 [media] v4l: omap4iss: csi2: Enable automatic ULP mode transition
Automatically switch between ULP and ON states based on ULPM signal from
complex I/O.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:58:01 -02:00
Laurent Pinchart 86efc50432 [media] v4l: omap4iss: ipipeif: Shift input data according to the input format
Input samples must be left-aligned on the ISIF 16-bit data bus.
Configure the 16-to-16-bit selector to shift data according to the input
format.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:57:49 -02:00
Laurent Pinchart 74536b2ff0 [media] v4l: omap4iss: isif: Ignore VD0 interrupts when no buffer is available
The ISIF generates VD0 interrupts even when writes are disabled.
Disabling the ISIF when no buffer is available is thus not be enough, we
need to handle the situation explicitly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:57:23 -02:00
Laurent Pinchart cd782f9d6d [media] v4l: omap4iss: Fix operators precedence in ternary operators
The ternary operator ? : has a low precedence. Use parenthesis where
needed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:56:44 -02:00
Laurent Pinchart 380df42b57 [media] v4l: omap4iss: Don't make IRQ debugging functions inline
Let the compiler decide.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:56:26 -02:00
Laurent Pinchart 5122f6a26d [media] v4l: omap4iss: Enhance IRQ debugging
Add a pretty print function for ISP IRQs and remove the _INT suffix from
interrupt names to enhance readability.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:56:14 -02:00
Laurent Pinchart 54d0059c7b [media] v4l: omap4iss: isif: Define more VDINT registers
Use a macro to get the VDINT indexed registers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:55:33 -02:00
Laurent Pinchart ade1ec3736 [media] v4l: omap4iss: Define more ISS and ISP IRQ register bits
Add more register definitions at iss_regs.h and improve some register
names.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:53:31 -02:00
Laurent Pinchart 29ee626163 [media] v4l: omap4iss: Remove double semicolon at end of line
Pure CodingStyle fixes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:53:26 -02:00
Laurent Pinchart a0fe029ccc [media] v4l: omap4iss: Restrict line lengths to 80 characters where possible
Pure CodingStyle fixes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:53:14 -02:00
Laurent Pinchart 499226fb19 [media] v4l: omap4iss: Don't split log strings on multiple lines
Non-split strings help grepping for messages.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:50:22 -02:00
Laurent Pinchart 4cd89e91bb [media] v4l: omap4iss: Replace printk by dev_err
dev_err is preferred over printk(KERN_ERR) when a device pointer is
available.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:49:37 -02:00