platform/kernel/linux-3.10.git
9 years agoupstream: staging:media: Use dev_info() instead of pr_info()
Dulshani Gunawardhana [Sun, 20 Oct 2013 17:27:19 +0000 (22:57 +0530)]
upstream: staging:media: Use dev_info() instead of pr_info()

Use dev_info instead of pr_info() in go7007-usb.c.

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoupstream: staging: media: Use dev_err() instead of pr_err()
Dulshani Gunawardhana [Sun, 20 Oct 2013 17:26:45 +0000 (22:56 +0530)]
upstream: staging: media: Use dev_err() instead of pr_err()

Use dev_err() instead of pr_err() in go7007-usb.c.

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoupstream: staging: media: lirc: Replaced printk macro with dev_info(dev,....) in...
Archana kumari [Wed, 23 Oct 2013 19:47:41 +0000 (01:17 +0530)]
upstream: staging: media: lirc: Replaced printk macro with dev_info(dev,....) in lirc_imon.c

This patch replaces printk macro with dev_info(dev,....)
in lirc_imon.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoupstream: dmxdev: get rid of pointless clearing ->f_op
Al Viro [Sun, 22 Sep 2013 18:33:32 +0000 (14:33 -0400)]
upstream: dmxdev: get rid of pointless clearing ->f_op

nobody else will see that struct file after return from ->release()
anyway; just leave ->f_op as is and let __fput() do that fops_put().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoupstream: consolidate the reassignments of ->f_op in ->open() instances
Al Viro [Sun, 22 Sep 2013 18:17:15 +0000 (14:17 -0400)]
upstream: consolidate the reassignments of ->f_op in ->open() instances

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoupstream: [media] marvell-ccic: drop free_irq for devm_request_irq allocated irq
Wei Yongjun [Tue, 24 Sep 2013 02:35:50 +0000 (23:35 -0300)]
upstream: [media] marvell-ccic: drop free_irq for devm_request_irq allocated irq

irq allocated with devm_request_irq should not be freed using
free_irq, because doing so causes a dangling pointer, and a
subsequent double free.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] drivers: media: usb: b2c2: use usb_*_coherent() instead of pci_...
Chen Gang [Mon, 23 Sep 2013 02:20:48 +0000 (23:20 -0300)]
upstream: [media] drivers: media: usb: b2c2: use usb_*_coherent() instead of pci_*_consistent() in flexcop-usb.c

Some architectures do not support PCI, but still support USB, so need
let our usb driver try to use usb_* instead of pci_* to support these
architectures, or can not pass compiling.
The related error (with allmodconfig for arc):
    CC [M]  drivers/media/usb/b2c2/flexcop-usb.o
  drivers/media/usb/b2c2/flexcop-usb.c: In function ‘flexcop_usb_transfer_exit’:
  drivers/media/usb/b2c2/flexcop-usb.c:393: error: implicit declaration of function ‘pci_free_consistent’
  drivers/media/usb/b2c2/flexcop-usb.c: In function ‘flexcop_usb_transfer_init’:
  drivers/media/usb/b2c2/flexcop-usb.c:410: error: implicit declaration of function ‘pci_alloc_consistent’

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: Change variable type to bool
Peter Senna Tschudin [Sat, 21 Sep 2013 22:27:38 +0000 (19:27 -0300)]
upstream: [media] media: Change variable type to bool

The variable frame_ready is only assigned the values true and false.
Change its type to bool.
The simplified semantic patch that find this problem is as
follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
  b = ...;
  ... when any
  b = \(true\|false\)

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] videobuf2-core: call __setup_offsets only for mmap memory type
Philipp Zabel [Thu, 19 Sep 2013 07:37:29 +0000 (04:37 -0300)]
upstream: [media] videobuf2-core: call __setup_offsets only for mmap memory type

__setup_offsets fills the v4l2_planes' mem_offset fields, which is only valid
for V4L2_MEMORY_MMAP type buffers. For V4L2_MEMORY_DMABUF and _USERPTR buffers,
this incorrectly overwrites the fd and userptr fields.

Reported-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] uvcvideo: Fix data type for pan/tilt control
Chanho Min [Fri, 27 Sep 2013 04:57:40 +0000 (01:57 -0300)]
upstream: [media] uvcvideo: Fix data type for pan/tilt control

The pan/tilt absolute control value is signed value. If minimum value
is minus, It will be changed to plus by clamp_t() as commit 64ae9958a62.
([media] uvcvideo: Fix control value clamping for unsigned integer controls).
It leads to wrong setting of the control values. For example,
when min and max are -36000 and 36000, the setting value between of this range
is always 36000. So, its data type should be changed to signed.

Signed-off-by: Chanho Min <chanho.min@lge.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] cx25821: fix sparse warnings
Hans Verkuil [Fri, 4 Oct 2013 14:01:51 +0000 (11:01 -0300)]
upstream: [media] cx25821: fix sparse warnings

drivers/media/pci/cx25821/cx25821-cards.c:49:20: warning: symbol 'cx25821_bcount' was not declared. Should it be static?
drivers/media/pci/cx25821/cx25821-video-upstream.c:162:33: warning: incorrect type in assignment (different base types)
drivers/media/pci/cx25821/cx25821-video-upstream.c:163:33: warning: incorrect type in assignment (different base types)
drivers/media/pci/cx25821/cx25821-video-upstream.c:164:33: warning: incorrect type in assignment (different base types)
drivers/media/pci/cx25821/cx25821-video-upstream.c:165:33: warning: incorrect type in assignment (different base types)
drivers/media/pci/cx25821/cx25821-medusa-video.h:43:16: warning: symbol '_num_decoders' was not declared. Should it be static?
drivers/media/pci/cx25821/cx25821-medusa-video.h:44:16: warning: symbol '_num_cameras' was not declared. Should it be static?
drivers/media/pci/cx25821/cx25821-medusa-video.h:46:14: warning: symbol '_video_standard' was not declared. Should it be static?
drivers/media/pci/cx25821/cx25821-medusa-video.h:47:5: warning: symbol '_display_field_cnt' was not declared. Should it be static?
After analyzing the last four warnings carefully it became clear that these
variables were really completely unused. As a result of that the call to
medusa_set_decoderduration() is now dubious since the duration is always 0.
Without documentation, however, I can't tell what the right value is.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l2-fh: Include linux/videodev2.h for enum v4l2_priority definition
Laurent Pinchart [Thu, 3 Oct 2013 21:59:30 +0000 (18:59 -0300)]
upstream: [media] v4l2-fh: Include linux/videodev2.h for enum v4l2_priority definition

struct v4l2_fh has an enum v4l2_priority field. Make sure the enum
definition is available by including linux/videodev2.h.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l2-fh: Include linux/fs.h for struct file definition
Laurent Pinchart [Thu, 3 Oct 2013 21:55:52 +0000 (18:55 -0300)]
upstream: [media] v4l2-fh: Include linux/fs.h for struct file definition

v4l2-fh.h dereferences struct file, the structure must thus be defined.
Pull in its definition by including linux/fs.h.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l2-ctrls: Correct v4l2_ctrl_get_int_menu() function's return...
Sylwester Nawrocki [Mon, 14 Oct 2013 23:08:03 +0000 (20:08 -0300)]
upstream: [media] v4l2-ctrls: Correct v4l2_ctrl_get_int_menu() function's return type

Remove the redundant 'const' qualifiers from the function
signature and from the qmenu_int arrays' declarations.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] winbond-cir: remove deprecated IRQF_DISABLED
Michael Opdenacker [Sun, 13 Oct 2013 06:11:12 +0000 (03:11 -0300)]
upstream: [media] winbond-cir: 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: David Härdeman <david@hardeman.nu>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] ir-rx51: remove deprecated IRQF_DISABLED
Michael Opdenacker [Sun, 13 Oct 2013 06:08:36 +0000 (03:08 -0300)]
upstream: [media] ir-rx51: 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>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] ivtv: remove deprecated IRQF_DISABLED
Michael Opdenacker [Sun, 13 Oct 2013 05:54:40 +0000 (02:54 -0300)]
upstream: [media] ivtv: 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>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] zoran: remove deprecated IRQF_DISABLED
Michael Opdenacker [Sun, 13 Oct 2013 05:52:32 +0000 (02:52 -0300)]
upstream: [media] zoran: 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>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] misc drivers: remove deprecated IRQF_DISABLED
Michael Opdenacker [Sun, 13 Oct 2013 05:49:29 +0000 (02:49 -0300)]
upstream: [media] misc drivers: 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>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] cx18: remove deprecated IRQF_DISABLED
Michael Opdenacker [Sun, 13 Oct 2013 05:37:35 +0000 (02:37 -0300)]
upstream: [media] cx18: 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>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] saa7146: remove deprecated IRQF_DISABLED
Michael Opdenacker [Sun, 13 Oct 2013 05:27:49 +0000 (02:27 -0300)]
upstream: [media] saa7146: 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>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: fix error path in em28xx_start_analog_streaming()
Frank Schaefer [Thu, 10 Oct 2013 18:31:53 +0000 (15:31 -0300)]
upstream: [media] em28xx: fix error path in em28xx_start_analog_streaming()

Increase the streaming_users count only if streaming start succeeds.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: fix and unify the coding style of the GPIO register write...
Frank Schaefer [Thu, 10 Oct 2013 17:36:30 +0000 (14:36 -0300)]
upstream: [media] em28xx: fix and unify the coding style of the GPIO register write sequences

Fix CodingStyle on the GPIO init tables.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] cx231xx: fix double free and leaks on failure path in cx231xx_usb_p...
Alexey Khoroshilov [Mon, 7 Oct 2013 21:06:04 +0000 (18:06 -0300)]
upstream: [media] cx231xx: fix double free and leaks on failure path in cx231xx_usb_probe()

There are numerous issues in error handling code of cx231xx initialization.
Double free (when cx231xx_init_dev() calls kfree(dev) via cx231xx_release_resources()
and then cx231xx_usb_probe() does the same) and memory leaks
(e.g. usb_get_dev() before (ifnum != 1) check in cx231xx_usb_probe())
are just a few of them.
The patch fixes the issues in cx231xx_usb_probe() and cx231xx_init_dev()
by moving usb_get_dev(interface_to_usbdev(interface)) below in code and
implementing proper error handling.
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>
9 years agoupstream: [media] saa7146: remove unnecessary pci_set_drvdata()
Jingoo Han [Mon, 23 Sep 2013 01:44:35 +0000 (22:44 -0300)]
upstream: [media] saa7146: remove unnecessary pci_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-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>
9 years agoupstream: [media] pci: ngene: Remove redundant pci_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 08:36:21 +0000 (05:36 -0300)]
upstream: [media] pci: ngene: Remove redundant pci_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] pci: bt878: Remove redundant pci_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 08:36:20 +0000 (05:36 -0300)]
upstream: [media] pci: bt878: Remove redundant pci_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] pci: saa7164: Remove redundant pci_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 08:36:19 +0000 (05:36 -0300)]
upstream: [media] pci: saa7164: Remove redundant pci_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] pci: pt1: Remove redundant pci_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 08:36:18 +0000 (05:36 -0300)]
upstream: [media] pci: pt1: Remove redundant pci_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] pci: pluto2: Remove redundant pci_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 08:36:17 +0000 (05:36 -0300)]
upstream: [media] pci: pluto2: Remove redundant pci_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] pci: mantis: Remove redundant pci_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 08:36:16 +0000 (05:36 -0300)]
upstream: [media] pci: mantis: Remove redundant pci_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] pci: dm1105: Remove redundant pci_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 08:36:15 +0000 (05:36 -0300)]
upstream: [media] pci: dm1105: Remove redundant pci_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] pci: cx88: Remove redundant pci_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 08:36:14 +0000 (05:36 -0300)]
upstream: [media] pci: cx88: Remove redundant pci_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] pci: flexcop: Remove redundant pci_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 08:36:13 +0000 (05:36 -0300)]
upstream: [media] pci: flexcop: Remove redundant pci_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-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>
9 years agoupstream: [media] pci: cx88-video: Use module_pci_driver
Sachin Kamat [Fri, 20 Sep 2013 08:32:07 +0000 (05:32 -0300)]
upstream: [media] pci: cx88-video: Use module_pci_driver

module_pci_driver removes some boilerplate and makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] pci: cx88-mpeg: Use module_pci_driver
Sachin Kamat [Fri, 20 Sep 2013 08:32:06 +0000 (05:32 -0300)]
upstream: [media] pci: cx88-mpeg: Use module_pci_driver

module_pci_driver removes some boilerplate and makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] pci: cx88-alsa: Use module_pci_driver
Sachin Kamat [Fri, 20 Sep 2013 08:32:05 +0000 (05:32 -0300)]
upstream: [media] pci: cx88-alsa: Use module_pci_driver

module_pci_driver removes some boilerplate and makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-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>
9 years agoupstream: [media] radio-si4713: remove deprecated IRQF_DISABLED
Michael Opdenacker [Sun, 13 Oct 2013 06:05:11 +0000 (03:05 -0300)]
upstream: [media] radio-si4713: 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>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] siano: fix sparse warnings
Hans Verkuil [Fri, 4 Oct 2013 14:01:52 +0000 (11:01 -0300)]
upstream: [media] siano: fix sparse warnings

drivers/media/common/siano/smsdvb-main.c:47:5: warning: symbol 'sms_to_guard_interval_table' was not declared. Should it be static?
drivers/media/common/siano/smsdvb-main.c:54:5: warning: symbol 'sms_to_code_rate_table' was not declared. Should it be static?
drivers/media/common/siano/smsdvb-main.c:63:5: warning: symbol 'sms_to_hierarchy_table' was not declared. Should it be static?
drivers/media/common/siano/smsdvb-main.c:70:5: warning: symbol 'sms_to_modulation_table' was not declared. Should it be static?
drivers/media/common/siano/smscoreapi.c:925:35: warning: cast to restricted __le32
drivers/media/common/siano/smscoreapi.c:926:28: warning: cast to restricted __le32

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l2-ctrls: fix typo in header file media/v4l2-ctrls.h
Frank Schaefer [Thu, 10 Oct 2013 17:21:32 +0000 (14:21 -0300)]
upstream: [media] v4l2-ctrls: fix typo in header file media/v4l2-ctrls.h

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] v4l: tuner-core: fix typo
Lad, Prabhakar [Thu, 10 Oct 2013 13:39:32 +0000 (10:39 -0300)]
upstream: [media] v4l: tuner-core: fix typo

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>
9 years agoupstream: [media] media: Remove unnecessary semicolons
Joe Perches [Tue, 8 Oct 2013 23:29:08 +0000 (20:29 -0300)]
upstream: [media] media: Remove unnecessary semicolons

These aren't necessary after switch and while statements.

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] SOLO6x10: Fix video frame type (I/P/B)
Krzysztof Hałasa [Mon, 7 Oct 2013 11:33:55 +0000 (08:33 -0300)]
upstream: [media] SOLO6x10: Fix video frame type (I/P/B)

Mask v4l2_buf.flags to indicate only I/P/B frames.

Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] tlg2300: fix sparse warning
Hans Verkuil [Fri, 4 Oct 2013 14:01:50 +0000 (11:01 -0300)]
upstream: [media] tlg2300: fix sparse warning

drivers/media/usb/tlg2300/pd-main.c:235:25: warning: incorrect type in assignment (different base types)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] cx231xx: fix sparse warnings
Hans Verkuil [Fri, 4 Oct 2013 14:01:49 +0000 (11:01 -0300)]
upstream: [media] cx231xx: fix sparse warnings

drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c:31:19: warning: symbol 'cx231xx_Scenario' was not declared. Should it be static?
drivers/media/usb/cx231xx/cx231xx-pcb-cfg.c:675:23: warning: cast to restricted __le32

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] radio-keene: fix sparse warning
Hans Verkuil [Fri, 4 Oct 2013 14:01:47 +0000 (11:01 -0300)]
upstream: [media] radio-keene: fix sparse warning

drivers/media/radio/radio-keene.c:126:45: warning: dubious: !x | y

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] fmdrv_common: fix sparse warning
Hans Verkuil [Fri, 4 Oct 2013 14:01:46 +0000 (11:01 -0300)]
upstream: [media] fmdrv_common: fix sparse warning

drivers/media/radio/wl128x/fmdrv_common.c:178:6: warning: symbol 'g_st_write' was not declared. Should it be static?

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] tuner-xs2028.c: fix sparse warnings
Hans Verkuil [Fri, 4 Oct 2013 14:01:42 +0000 (11:01 -0300)]
upstream: [media] tuner-xs2028.c: fix sparse warnings

drivers/media/tuners/tuner-xc2028.c:575:24: warning: cast to restricted __le16
drivers/media/tuners/tuner-xc2028.c:686:21: warning: cast to restricted __le16

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] timblogiw: fix two sparse warnings
Hans Verkuil [Fri, 4 Oct 2013 14:01:41 +0000 (11:01 -0300)]
upstream: [media] timblogiw: fix two sparse warnings

drivers/media/platform/timblogiw.c:763:43: warning: incorrect type in initializer (incompatible argument 3 (different signedness))
drivers/media/platform/timblogiw.c:764:43: warning: incorrect type in initializer (incompatible argument 3 (different signedness))

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] pvrusb2: fix sparse warning
Hans Verkuil [Fri, 4 Oct 2013 14:01:40 +0000 (11:01 -0300)]
upstream: [media] pvrusb2: fix sparse warning

drivers/media/usb/pvrusb2/pvrusb2-hdw.c:2871:13: warning: symbol 'pvr2_hdw_get_detected_std' was not declared. Should it be static?

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] hdpvr: fix sparse warnings
Hans Verkuil [Fri, 4 Oct 2013 14:01:39 +0000 (11:01 -0300)]
upstream: [media] hdpvr: fix sparse warnings

drivers/media/usb/hdpvr/hdpvr-core.c:110:54: warning: incorrect type in argument 1 (different base types)
drivers/media/usb/hdpvr/hdpvr-core.c:112:39: warning: invalid assignment: +=
drivers/media/usb/hdpvr/hdpvr-core.c:304:26: warning: Using plain integer as NULL pointer

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] gscpa_ov534_9: Add support for ov3610 sensor
Vladik Aranov [Sat, 21 Sep 2013 00:09:44 +0000 (21:09 -0300)]
upstream: [media] gscpa_ov534_9: Add support for ov3610 sensor

Dear Hans de Goede, I have Ubuntu (raring) and recently bought digital
microscope eyepiece Lomo MD300. It is the same device as Future Optics MVV3000.
Unfortunately it does not work out of box. Moreover drivers refused to work
under Windows 7 as well leaving me only with Win Xp working system. I have had
no choice but to examine what happened in USB bus and attempt to reproduce the
sequence. So, i have download the source(3.8.0-30 kernel) and made required
changes to driver to make my hardware work.
I submit my changed files to you as maintainer of the driver so you can
integrade my changes into main stream. Thanx. Hopefully my Ubuntu will work
with my hardware out of box.
Sincerely yours Vladik Aranov

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: MaxMedia UB425-TC change demod settings
Antti Palosaari [Fri, 4 Oct 2013 18:25:55 +0000 (15:25 -0300)]
upstream: [media] em28xx: MaxMedia UB425-TC change demod settings

That version of DRX-K chip supports only 2.
drxk: SCU_RESULT_INVPAR while sending cmd 0x0203 with params:
drxk: Warning -22 on qam_demodulator_command

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: MaxMedia UB425-TC switch RF tuner driver to another
Antti Palosaari [Fri, 4 Oct 2013 18:17:51 +0000 (15:17 -0300)]
upstream: [media] em28xx: MaxMedia UB425-TC switch RF tuner driver to another

tda18271c2dd => tda18271
tda18271 is more complete than tda18271c2dd.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] em28xx: MaxMedia UB425-TC offer firmware for demodulator
Antti Palosaari [Fri, 4 Oct 2013 17:40:06 +0000 (14:40 -0300)]
upstream: [media] em28xx: MaxMedia UB425-TC offer firmware for demodulator

Downloading new firmware for DRX-K demodulator is not obligatory but
usually it offers important bug fixes compared to default firmware
burned into chip rom. DRX-K demod driver will continue even without
the firmware, but in that case it will print warning to system log
to tip user he should install firmware.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: treewide: Fix common typo in "identify"
Maxime Jayat [Fri, 11 Oct 2013 23:29:46 +0000 (01:29 +0200)]
upstream: treewide: Fix common typo in "identify"

Correct common misspelling of "identify" as "indentify" throughout
the kernel

Signed-off-by: Maxime Jayat <maxime@artisandeveloppeur.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
9 years agoupstream: [media] cx23885: Add Leadtek Winfast PxPVR2200
Anca Emanuel [Fri, 13 Sep 2013 14:28:12 +0000 (11:28 -0300)]
upstream: [media] cx23885: Add Leadtek Winfast PxPVR2200

Tested:
   Composite: http://imgur.com/Rb1TCF3
   TV: http://imgur.com/KNrfsmv
   Firmware used: xc3028-v27.fw

Not tested: audio, component, s-video, mpeg2 encoder, FM radio.

For audio, it uses an CD style cable to connect to the analog "CD_IN" on the motherboard.

I didn't found how to unmute it (alsamixer do not show an CD or AUX channel).

Signed-off-by: Anca Emanuel <anca.emanuel@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] siano: Use the default firmware for Stellar
Mauro Carvalho Chehab [Thu, 12 Sep 2013 20:04:07 +0000 (17:04 -0300)]
upstream: [media] siano: Use the default firmware for Stellar

The Stellar firmware load routine is different. Improve it to use
the default firmware, if no modprobe parameter tells otherwise.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Tested-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] siano: Fix initialization for Stellar models
Mauro Carvalho Chehab [Thu, 12 Sep 2013 20:00:00 +0000 (17:00 -0300)]
upstream: [media] siano: Fix initialization for Stellar models

Since kernel 3.8, the initialization for Stellar (sms1000)
devices are broken.
Those devices have a behaviour different than usual sms1100
and sms2270: they start with one USB ID (devices in cold state),
but after firmware load, they get a different USB ID.
This weren't docummented at the driver. So, the patches that added
support for sms2270 broke it.
Properly documment it, and provide a debug log that allows to
follow all phases of the device initialization:
smsusb_probe: board id=13, interface number 0
smsusb_probe: interface 0 won't be used. Expecting interface 1 to popup
smsusb_probe: board id=13, interface number 1
smsusb_probe: smsusb_probe 1
smsusb_probe: endpoint 0 81 02 64
smsusb_probe: endpoint 1 02 02 64
smsusb_probe: stellar device in cold state was found at usb\4-2.
smsusb1_load_firmware: sent 38144(38144) bytes, rc 0
smsusb1_load_firmware: read FW dvbt_bda_stellar_usb.inp, size=38144
smsusb_probe: stellar device now in warm state
usbcore: registered new interface driver smsusb
usb 4-2: USB disconnect, device number 52
usb 4-2: new full-speed USB device number 53 using uhci_hcd
usb 4-2: New USB device found, idVendor=187f, idProduct=0100
usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 4-2: Product: SMS DVBT-BDA Receiver
usb 4-2: Manufacturer: Siano Mobile Silicon
smsusb_probe: board id=1, interface number 0
smsusb_probe: smsusb_probe 0
smsusb_probe: endpoint 0 81 02 64
smsusb_probe: endpoint 1 02 02 64
smsusb_init_device: in_ep = 81, out_ep = 02
smscore_register_device: allocated 50 buffers
smscore_register_device: device ffff88012a00bc00 created
smsusb_init_device: smsusb_start_streaming(...).
smscore_set_device_mode: set device mode to 4
smsusb1_detectmode: 4 "SMS DVBT-BDA Receiver"
smsusb_sendrequest: sending MSG_SMS_INIT_DEVICE_REQ(578) size: 12
smsusb_onresponse: received MSG_SMS_INIT_DEVICE_RES(579) size: 12
smscore_set_device_mode: Success setting device mode.
smscore_init_ir: IR port has not been detected
smscore_start_device: device ffff88012a00bc00 started, rc 0
smsusb_init_device: device 0xffff88002cfa6000 created
smsusb_probe: Device initialized with return code 0
DVB: registering new adapter (Siano Stellar Digital Receiver)
usb 4-2: DVB: registering adapter 0 frontend 0 (Siano Mobile Digital MDTV Receiver)...
smscore_register_client: ffff88012174a000 693 1
sms_board_dvb3_event: DVB3_EVENT_HOTPLUG
smsdvb_hotplug: success
smsdvb_module_init:

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Tested-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] siano: Improve debug/info messages
Mauro Carvalho Chehab [Thu, 12 Sep 2013 19:59:59 +0000 (16:59 -0300)]
upstream: [media] siano: Improve debug/info messages

Some messages are not clear, some are debug data, but are
shown as errors, and one message is duplicated.
Cleanup that mess in order to provide a cleaner log.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Tested-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] siano: Don't show debug messages as errors
Mauro Carvalho Chehab [Thu, 12 Sep 2013 19:59:58 +0000 (16:59 -0300)]
upstream: [media] siano: Don't show debug messages as errors

At this bugzilla and similar ones:
   https://bugzilla.kernel.org/show_bug.cgi?id=60645
Those debug messages were seen as errors, but they're just debug
data, and are OK to appear on sms1100 and sms2270. Re-tag them
to appear only if debug is enabled.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Tested-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] cx24117: prevent mutex to be stuck on locked state if FE init fails
Luis Alves [Fri, 4 Oct 2013 14:48:11 +0000 (11:48 -0300)]
upstream: [media] cx24117: prevent mutex to be stuck on locked state if FE init fails

This patch will fix the situation where the mutex was left in a
locked state if for some reason the FE init failed.

Signed-off-by: Luis Alves <ljalvs@gmail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] radio-sf16fmr2: Remove redundant dev_set_drvdata
Sachin Kamat [Fri, 20 Sep 2013 07:37:51 +0000 (04:37 -0300)]
upstream: [media] radio-sf16fmr2: Remove redundant dev_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-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>
9 years agoupstream: [media] SOLO6x10: Fix video headers on certain hardware
Krzysztof Hałasa [Thu, 12 Sep 2013 11:43:34 +0000 (08:43 -0300)]
upstream: [media] SOLO6x10: Fix video headers on certain hardware

On certain platforms a sequence of dma_map_sg() and dma_unmap_sg()
discards data previously stored in the buffers. Build video headers
only after the DMA is completed.

Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
[hans.verkuil@cisco.com: fix merge problems due to the recent solo sg_table changes]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] SOLO6x10: Fix video encoding on big-endian systems
Krzysztof Hałasa [Thu, 12 Sep 2013 11:28:07 +0000 (08:28 -0300)]
upstream: [media] SOLO6x10: Fix video encoding on big-endian systems

Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
[hans.verkuil@cisco.com: fix merge problems due to the recent solo sg_table changes]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] SOLO6x10: Remove unused #define SOLO_DEFAULT_GOP
Krzysztof Hałasa [Thu, 12 Sep 2013 11:26:46 +0000 (08:26 -0300)]
upstream: [media] SOLO6x10: Remove unused #define SOLO_DEFAULT_GOP

Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] SOLO6x10: don't do DMA from stack in solo_dma_vin_region()
Krzysztof Hałasa [Thu, 12 Sep 2013 11:25:36 +0000 (08:25 -0300)]
upstream: [media] SOLO6x10: don't do DMA from stack in solo_dma_vin_region()

[m.chehab@samsung.com: Fix CodingStyle: don't use 2 statements on just one line]

Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] snd_tea575x: precedence bug in fmr2_tea575x_get_pins()
Dan Carpenter [Thu, 22 Aug 2013 16:07:17 +0000 (13:07 -0300)]
upstream: [media] snd_tea575x: precedence bug in fmr2_tea575x_get_pins()

The "|" operation has higher precedence that "?:" so this couldn't
return both flags set at once as intended.

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>
9 years agoupstream: staging: lirc: Do not use 0 for NULL pointer
Sachin Kamat [Wed, 9 Oct 2013 10:28:29 +0000 (15:58 +0530)]
upstream: staging: lirc: Do not use 0 for NULL pointer

Do not use 0 for NULL pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Jarod Wilson <jarod@wilsonet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoupstream: staging:go7007:Fix warning on quoted string on multiple lines
Dulshani Gunawardhana [Wed, 9 Oct 2013 09:51:38 +0000 (15:21 +0530)]
upstream: staging:go7007:Fix warning on quoted string on multiple lines

Fix checkpatch.pl warning on quoted string on multiple lines in
go7007-usb.c

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoupstream: staging:go7007:Fix line over 80 character warning
Dulshani Gunawardhana [Wed, 9 Oct 2013 09:51:20 +0000 (15:21 +0530)]
upstream: staging:go7007:Fix line over 80 character warning

Fix "line over 80 characters" warning generated by checkpatch.pl for
go7007-usb.c

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoupstream: staging:go7007 : Replace KERN_INFO with pr_info
Dulshani Gunawardhana [Wed, 9 Oct 2013 09:50:28 +0000 (15:20 +0530)]
upstream: staging:go7007 : Replace KERN_INFO with pr_info

Replace KERN_INFO with pr_info in go7007-usb.c

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoupstream: staging:go7007:Replace KERN_ERR with pr_err
Dulshani Gunawardhana [Wed, 9 Oct 2013 06:28:54 +0000 (11:58 +0530)]
upstream: staging:go7007:Replace KERN_ERR with pr_err

Replace KERN_ERR with pr_err in go7007-usb.c

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoupstream: staging:go7007:Remove driver-specific debugging defines in favor of pr_debug
Dulshani Gunawardhana [Wed, 9 Oct 2013 06:28:02 +0000 (11:58 +0530)]
upstream: staging:go7007:Remove driver-specific debugging defines in favor of pr_debug

Remove driver-specific debugging defines in favor of pr_debug in
go7007-usb.c

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoupstream: staging/media/go7007:Replace kern_debug with pr_debug
Dulshani Gunawardhana [Fri, 4 Oct 2013 21:19:18 +0000 (02:49 +0530)]
upstream: staging/media/go7007:Replace kern_debug with pr_debug

Replace kern_debug with pr_debug in go7007-usb.c

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoupstream: s3c-camif: Use CONFIG_ARCH_S3C64XX to check for S3C64XX support
Tomasz Figa [Sat, 5 Oct 2013 23:59:34 +0000 (08:59 +0900)]
upstream: s3c-camif: Use CONFIG_ARCH_S3C64XX to check for S3C64XX support

Since CONFIG_PLAT_S3C64XX is going to be removed, this patch modifies
the Kconfig entry of s3c-camif driver to use the proper way of checking
for S3C64xx support - CONFIG_ARCH_S3C64XX.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
9 years agoupstream: media: s5c73m3: Don't use i2c_client->driver
Lars-Peter Clausen [Sun, 29 Sep 2013 08:50:59 +0000 (10:50 +0200)]
upstream: media: s5c73m3: Don't use i2c_client->driver

The 'driver' field of the i2c_client struct is redundant and is going to be
removed. The results of the expressions 'client->driver.driver->field' and
'client->dev.driver->field' are identical, so replace all occurrences of the
former with the later.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
9 years agoupstream: [media] adv7511: fix error return code in adv7511_probe()
Wei Yongjun [Wed, 11 Sep 2013 13:07:58 +0000 (10:07 -0300)]
upstream: [media] adv7511: fix error return code in adv7511_probe()

Fix to return -ENOMEM in the new i2c client and create workqueue error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] davinci: remove deprecated IRQF_DISABLED
Michael Opdenacker [Mon, 9 Sep 2013 02:30:11 +0000 (23:30 -0300)]
upstream: [media] davinci: remove deprecated IRQF_DISABLED

This patch proposes to remove the IRQF_DISABLED flag from
davinci media platform drivers.
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: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media/v4l2: VIDEO_RENESAS_VSP1 should depend on HAS_DMA
Geert Uytterhoeven [Fri, 6 Sep 2013 11:43:56 +0000 (08:43 -0300)]
upstream: [media] media/v4l2: VIDEO_RENESAS_VSP1 should depend on HAS_DMA

If NO_DMA=y:
warning: (... && VIDEO_RENESAS_VSP1 && ...) selects VIDEOBUF2_DMA_CONTIG which has unmet direct dependencies (MEDIA_SUPPORT && HAS_DMA)
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:
drivers/media/v4l2-core/videobuf2-dma-contig.c:202: error: implicit declaration of function ‘dma_mmap_coherent’
drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:
drivers/media/v4l2-core/videobuf2-dma-contig.c:385: error: implicit declaration of function ‘dma_get_sgtable’
make[7]: *** [drivers/media/v4l2-core/videobuf2-dma-contig.o] Error 1
VIDEO_RENESAS_VSP1 (which doesn't have a platform dependency) selects
VIDEOBUF2_DMA_CONTIG, but the latter depends on HAS_DMA.
Make VIDEO_RENESAS_VSP1 depend on HAS_DMA to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] lirc_bt829: Note in TODO why it can't be a normal PCI driver yet
Ben Hutchings [Thu, 5 Sep 2013 01:32:34 +0000 (22:32 -0300)]
upstream: [media] lirc_bt829: Note in TODO why it can't be a normal PCI driver yet

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] lirc_bt829: Enable and disable device
Ben Hutchings [Thu, 5 Sep 2013 01:32:19 +0000 (22:32 -0300)]
upstream: [media] lirc_bt829: Enable and disable device

We must not assume that the PCI device is already enabled.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] lirc_bt829: Fix iomap and PCI device leaks
Ben Hutchings [Thu, 5 Sep 2013 01:31:59 +0000 (22:31 -0300)]
upstream: [media] lirc_bt829: Fix iomap and PCI device leaks

We must call iounmap() and pci_dev_put() when removed and on
the probe failure path.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] lirc_bt829: Fix physical address type
Ben Hutchings [Thu, 5 Sep 2013 01:31:15 +0000 (22:31 -0300)]
upstream: [media] lirc_bt829: Fix physical address type

Use phys_addr_t and log format %pa.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] davinci: vpif_capture: fix error return code in vpif_probe()
Wei Yongjun [Mon, 2 Sep 2013 08:06:10 +0000 (05:06 -0300)]
upstream: [media] davinci: vpif_capture: fix error return code in vpif_probe()

Fix to return -ENODEV in the subdevice register error handling.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] cx24117: use hybrid_tuner_request/release_state to share state...
Luis Alves [Thu, 3 Oct 2013 11:33:47 +0000 (08:33 -0300)]
upstream: [media] cx24117: use hybrid_tuner_request/release_state to share state between multiple instances

...and remove the frontend pointer param from cx24117_attach()

Signed-off-by: Luis Alves <ljalvs@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] cx23885: add support for cx24117 with tbs6980 or tbs6981
Luis Alves [Wed, 2 Oct 2013 01:11:35 +0000 (22:11 -0300)]
upstream: [media] cx23885: add support for cx24117 with tbs6980 or tbs6981

Signed-off-by: Luis Alves <ljalvs@gmail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] dvb: add cx24117 frontend
Luis Alves [Wed, 2 Oct 2013 01:11:19 +0000 (22:11 -0300)]
upstream: [media] dvb: add cx24117 frontend

Add support for the cx24117 dual DVB-S/S2 frontend.

Signed-off-by: Luis Alves <ljalvs@gmail.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] dvb-usb: fix error handling in ttusb_dec_probe()
Alexey Khoroshilov [Wed, 2 Oct 2013 16:00:26 +0000 (13:00 -0300)]
upstream: [media] dvb-usb: fix error handling in ttusb_dec_probe()

There is an asymmetry in ttusb_dec_init_usb()-ttusb_init_rc()
and ttusb_dec_exit_usb()-ttusb_dec_exit_rc() in terms of resources
allocated-deallocated. irq_urb and irq_buffer are allocated in
ttusb_dec_init_usb(), while they are deallocated in ttusb_dec_exit_rc().
As a result there is a leak of them in ttusb_dec_probe().
The patch fixes the asymmetry and a leak on a failure path in ttusb_dec_init_usb().
By the way, it
- removes usage of -1 as a custom error code,
- replaces GFP_ATOMIC by GFP_KERNEL in usb_alloc_coherent() in ttusb_dec_init_usb()
  as soon as all other memory allocation done with GFP_KERNEL;
- refactors ttusb_dec_boot_dsp() in an equivalent way except for returning 0
  instead of 1 if ttusb_dec_boot_dsp() succeed in (!mode) branch.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] ts2020: keep 1.06 MHz as default value for frequency_div
Mauro Carvalho Chehab [Wed, 2 Oct 2013 09:43:37 +0000 (06:43 -0300)]
upstream: [media] ts2020: keep 1.06 MHz as default value for frequency_div

Changeset 9e8da9e8 added a parameter to specify the frequency
divisor, used by the driver. However, not all places are passing
this parameter. So, preserve the previous default, to avoid breaking
the existing drivers.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] media: dvb-frontends: ts2020: Added in a option for frequency divid...
John Horan [Wed, 28 Aug 2013 12:37:37 +0000 (09:37 -0300)]
upstream: [media] media: dvb-frontends: ts2020: Added in a option for frequency divider value for s600 devices

When the tuner part of the ds3000 driver was split to share code with the m88rs2000 driver, the ts2020 driver used
the frequency divider value from the m88rs2000 driver.  However the ds3000 driver requires a different value, and this
resulted in some frequecies being invisible to the tuner.  This patch adds back in the value needed for the ds3000 driver
and configured as an option in the dw2102 frontend driver.
It may also apply to su3000 devices, which use the same ds3000 driver, but for now it is only applied to the s660 device.

Signed-off-by: John Horan <knasher@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] dib9000: fix typo in spelling the word empty
Michael Krufky [Mon, 30 Sep 2013 16:24:48 +0000 (13:24 -0300)]
upstream: [media] dib9000: fix typo in spelling the word empty

Thanks-to: Joe Perches <joe@perches.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] dib9000: fix potential format string leak
Kees Cook [Mon, 30 Sep 2013 16:22:20 +0000 (13:22 -0300)]
upstream: [media] dib9000: fix potential format string leak

Make sure that a format string cannot accidentally
leak into the printk buffer.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] drxd_hard: remove unused SIZEOF_ARRAY
Christoph Jaeger [Mon, 30 Sep 2013 16:13:12 +0000 (13:13 -0300)]
upstream: [media] drxd_hard: remove unused SIZEOF_ARRAY

SIZEOF_ARRAY is not used (anymore). Besides, ARRAY_SIZE, defined in
include/linux/kernel.h, should be used rather than explicitly coding some
variant of it.

Signed-off-by: Christoph Jaeger <christophjaeger@linux.com>
Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] tda10071: change firmware download condition
Andreas Matthies [Mon, 30 Sep 2013 16:08:16 +0000 (13:08 -0300)]
upstream: [media] tda10071: change firmware download condition

Reading firmware status register to detect whether firmware is
running or not didn't work 100% reliably. That register was
likely set by firmware itself which means it could not contain
reasonable values until firmware is up and running. Usually it
just worked as some garbage value was returned accidentally but it
appears that in some cases returned garbage value was 0x00 which
was considered "firmware is up and running" by the driver and
firmware loading was skipped leaving device to non-working state.
Fix problem by removing unreliable check and let the driver keep
count whether firmware is loaded or not.

Signed-off-by: Andreas Matthies <a.matthies@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] fc001[23]: Change variable type to bool
Peter Senna Tschudin [Mon, 30 Sep 2013 16:00:26 +0000 (13:00 -0300)]
upstream: [media] fc001[23]: Change variable type to bool

The variable vco_select is only assigned the values true and false.
Change its type to bool.
The simplified semantic patch that find this problem is as
follows (http://coccinelle.lip6.fr/):
@exists@
type T;
identifier b;
@@
- T
+ bool
  b = ...;
  ... when any
  b = \(true\|false\)

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: staging: media/lirc: switch to use gpiolib
Linus Walleij [Tue, 10 Sep 2013 11:30:10 +0000 (13:30 +0200)]
upstream: staging: media/lirc: switch to use gpiolib

The lirc serial module has special hooks to work with NSLU2,
switch these over to use gpiolib, as that is available on the
ixp4 platform.

Not even compile tested as there is no way to select this
driver from menuconfig on the ixp4 platform.

Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
9 years agoupstream: [media] videobuf2: Add debug print for the output buffer plane lengths...
Sylwester Nawrocki [Mon, 26 Aug 2013 14:47:53 +0000 (11:47 -0300)]
upstream: [media] videobuf2: Add debug print for the output buffer plane lengths checks

Add debug print so it's easier to find any errors resulting from
the planes' configuration checks added in commit 8023ed09cb278004a2
"videobuf2-core: Verify planes lengths for output buffers".

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] videobuf2: Add log for size checking error in __qbuf_userptr
Seung-Woo Kim [Tue, 20 Aug 2013 07:48:06 +0000 (04:48 -0300)]
upstream: [media] videobuf2: Add log for size checking error in __qbuf_userptr

__qbuf_userptr checks whether provided buffer is large enough, and
it returns error without any log.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Heejin Woo <heejin.woo@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
9 years agoupstream: [media] videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table
Ricardo Ribalda [Fri, 2 Aug 2013 13:20:00 +0000 (10:20 -0300)]
upstream: [media] videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table

Replace the private struct vb2_dma_sg_desc with the struct sg_table so
we can benefit from all the helping functions in lib/scatterlist.c for
things like allocating the sg or compacting the descriptor.
marvel-ccic and solo6x10 drivers, that use this API have been updated.

Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
[s.nawrocki@samsung.com: minor corrections of the changelog]
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>