Commit graph

15834 commits

Author SHA1 Message Date
Andrzej Hajda
cac47f1822 [media] V4L: Add S5C73M3 camera driver
Add driver for S5C73M3 image sensor. The driver exposes the sensor as
two subdevs: pure sensor and output interface. Two subdev architecture
supports interleaved UYVY/JPEG image format with separate frame size
for both sub-formats, there is a spearate pad for each sub-format.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 17:39:04 -02:00
Arun Kumar K
6e83e6e25e [media] s5p-mfc: Fix kernel warning on memory init
Cleaned up the memory devices allocation code and added
missing device_initialize() call to remove the kernel warning
during memory allocations.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 17:32:52 -02:00
Sachin Kamat
e82564475e [media] s5p-mfc: Use WARN_ON(condition) directly
Use WARN_ON(condition) directly instead of wrapping around an if
condition.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 17:32:02 -02:00
Sachin Kamat
97466d0da3 [media] s5k6aa: Use devm_regulator_bulk_get API
devm_regulator_bulk_get is device managed and saves some cleanup
and exit code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 17:31:22 -02:00
Sylwester Nawrocki
23575bf421 [media] noon010p30: Remove unneeded v4l2 control compatibility ops
All host drivers using this subdev driver are already converted
to use the control framework so the compatibility ops can be dropped.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 17:30:48 -02:00
Sachin Kamat
62ce272d87 [media] s5p-g2d: Add support for G2D H/W Rev.4.1
Modified the G2D driver (which initially supported only H/W Rev.3)
to support H/W Rev.4.1 present on Exynos4x12 and Exynos52x0 SOCs.
- Set the SRC and DST type to 'memory' instead of using reset values.
- FIMG2D v4.1 H/W uses different logic for stretching(scaling).
- Use CACHECTL_REG only with FIMG2D v3.
[s.nawrocki: removed empty line at end of file]]

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 17:30:14 -02:00
Sachin Kamat
0e5d61d87b [media] s5p-mfc: Use NULL instead of 0 for pointer
Fixes the following warning:
drivers/media/platform/s5p-mfc/s5p_mfc_opr.c:56:27: warning:
Using plain integer as NULL pointer

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 17:29:14 -02:00
Sylwester Nawrocki
fa8880bece [media] s5p-fimc: Fix bytesperline value for V4L2_PIX_FMT_YUV420M format
Make sure bytesperline for Cb, Cr planes for V4L2_PIX_FMT_YUV420M
format is half of the Y plane value, rather than having same
bytesperline for all planes.
While at it, simplify the bytesperline parameter handling by
storing it when image format is set and returning those values
when getting the format, instead of recalculating bytesperline
from intermediate parameters.

Reported-by: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 17:28:48 -02:00
Kamil Debski
33133ea7ac [media] s5p-mfc: Fix a watchdog bug
Fixed wrong condition in firmware reload function used by the watchdog.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 17:27:19 -02:00
Hans Verkuil
ba1066d2e9 [media] tuner-core: map audmode to STEREO for radio devices
Fixes a v4l2-compliance error: setting audmode to a value other than mono
or stereo for a radio device should map to MODE_STEREO.
The spec specifies that for radio devices only mono and stereo audmodes are
valid. If the user specifies another audmode in v4l2_tuner, then that should
be mapped to valid audmode. That didn't happen here.
Note that tuner drivers might decide to limit the possible audmode even
further if it only supports mono. In that case the tuner driver can set
audmode to mono. However, that new value wasn't copied back to t->audmode,
and that has been fixed as well in this patch.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 16:55:38 -02:00
Sylwester Nawrocki
84a15ded76 [media] V4L: Add driver for OV9650/52 image sensors
This patch adds V4L2 sub-device driver for OV9650/OV9652 image sensors.
The driver exposes following V4L2 controls:
- auto/manual exposure,
- auto/manual white balance,
- auto/manual gain,
- brightness, saturation, sharpness,
- horizontal/vertical flip,
- color bar test pattern,
- banding filter (power line frequency).
Frame rate can be configured with g/s_frame_interval pad level ops.
Supported resolution are only: SXGA, VGA, QVGA.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 15:21:15 -02:00
Sylwester Nawrocki
ffa9b9f016 [media] V4L: Add v4l2_ctrl_subdev_log_status() helper function
This patch adds a v4l2 core helper function that can be used as
the log_status handler for subdevs that only need to log state
of the v4l2 controls owned by the subdev's control handler.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 15:17:16 -02:00
Sylwester Nawrocki
22fa4279ee [media] V4L: Add v4l2_ctrl_subdev_subscribe_event() helper function
Add a v4l2 core helper function that can be used as the subdev
.subscribe_event handler. This allows to eliminate some boilerplate
from drivers that are only handling the control events.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 15:05:26 -02:00
Sylwester Nawrocki
4f4d14b70a [media] V4L: Add v4l2_event_subdev_unsubscribe() helper function
Add a v4l2 core helper function that can be used as the subdev
.unsubscribe_event handler. This allows to eliminate some
boilerplate from drivers that are only handling the control events.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 15:04:55 -02:00
Sylwester Nawrocki
2ccbe779bc [media] v4l2-ctrl: Add helper function for the controls range update
This patch adds a helper function that allows to modify range,
i.e. minimum, maximum, step and default value of a v4l2 control,
after the control has been created and initialized. This is helpful
in situations when range of a control depends on user configurable
parameters, e.g. camera sensor absolute exposure time depending on
an output image resolution and frame rate.
v4l2_ctrl_modify_range() function allows to modify range of an
INTEGER, BOOL, MENU, INTEGER_MENU and BITMASK type controls.
Based on a patch from Hans Verkuil http://patchwork.linuxtv.org/patch/8654.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 15:04:06 -02:00
Hans de Goede
f192747955 [media] pwc: Don't return EINVAL when an unsupported pixelformat is requested
Instead chaneg the passed in format to the pwc default pixelformat.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:54:47 -02:00
Peter Senna Tschudin
78f968fa26 [media] usb/gspca/zc3xx.c: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:54:43 -02:00
Peter Senna Tschudin
e32d6eb865 [media] usb/gspca/xirlink_cit.c: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:54:40 -02:00
Peter Senna Tschudin
f8d2687963 [media] usb/gspca/t613.c: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:54:37 -02:00
Peter Senna Tschudin
00ddb70702 [media] usb/gspca/stv06xx/stv06xx.c: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:54:34 -02:00
Peter Senna Tschudin
60d2156378 [media] usb/gspca/spca561.c: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:54:31 -02:00
Peter Senna Tschudin
f11ef42e31 [media] usb/gspca/sonixj.c: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:54:27 -02:00
Peter Senna Tschudin
f5b6de9cf6 [media] usb/gspca/sonixb.c: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT
Also replaced:
 #if !defined CONFIG_USB_SN9C102 && !defined CONFIG_USB_SN9C102_MODULE
with:
 #if !IS_ENABLED(CONFIG_USB_SN9C102)

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:54:24 -02:00
Peter Senna Tschudin
8099affaa6 [media] usb/gspca/sn9c20x.c: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:54:22 -02:00
Peter Senna Tschudin
5fd30838da [media] usb/gspca/se401.c: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:54:10 -02:00
Peter Senna Tschudin
2d622e9137 [media] usb/gspca/pac7311.c: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:54:07 -02:00
Peter Senna Tschudin
ae814c0845 [media] gspca/pac7302.c: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:54:04 -02:00
Peter Senna Tschudin
4f4d178535 [media] usb/gspca/pac207.c: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:53:58 -02:00
Peter Senna Tschudin
c4ea799a2b [media] usb/gspca/ov519.c: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:53:54 -02:00
Peter Senna Tschudin
9bc0446331 [media] usb/gspca/konica.c: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:53:48 -02:00
Peter Senna Tschudin
13a00fabe4 [media] usb/gspca: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:53:39 -02:00
Peter Senna Tschudin
a3f6ce6345 [media] usb/gspca/cpia1.c: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_INPUT) || \
     defined(CONFIG_INPUT_MODULE)
with:
 #if IS_ENABLED(CONFIG_INPUT)
This change was made for: CONFIG_INPUT

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:53:14 -02:00
Peter Senna Tschudin
480d3ca13e [media] radio/si470x/radio-si470x.h: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_USB_SI470X) || \
     defined(CONFIG_USB_SI470X_MODULE)
with:
 #if IS_ENABLED(CONFIG_USB_SI470X)
This change was made for: CONFIG_USB_SI470X,
CONFIG_I2C_SI470X

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:52:46 -02:00
Johannes Schellen
58bc8b7e38 [media] omap3isp: Fix histogram regions
This patch fixes a bug which causes all histogram regions to start in the
top left corner of the image. The histogram region coordinates are 16 bit
values which share a 32 bit register. The bug is due to the region end
value assignments overwriting the region start values with zero.

Signed-off-by: Johannes Schellen <Johannes.Schellen@rwth-aachen.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:50:49 -02:00
Laurent Pinchart
cf2b4cf661 [media] omap3isp: Use devm_* managed functions
Replace kzalloc, request_mem_region, ioremap, clk_get and regulator_get
with their devm_* managed replacement.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:49:17 -02:00
Laurent Pinchart
3d5a71ef32 [media] omap3isp: Remove unneeded memset after kzalloc
kzalloc initializes the memory it allocates to 0, there's no need for an
explicit memset.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:48:13 -02:00
Laurent Pinchart
3fdfedaaa7 [media] omap3isp: preview: Lower the crop margins
The preview engine includes filters that consume columns and lines as
part of their operation, thus resulting in a cropped image. To allow
turning those filters on/off during streaming without affecting the
output image size, the driver adds additional cropping to make the total
number of cropped columns and lines constant regardless of which filters
are enabled.
This process needlessly includes the CFA filter, as whether the filter
is enabled only depends on the sink pad format, which can't change
during streaming.
Exclude the CFA filter from the preview engine margins.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:45:29 -02:00
Oliver Neukum
a82a45f653 [media] uvcvideo: Fix race of open and suspend in error case
Ming Lei reported:
IMO, there is a minor fault in the error handling path of
uvc_status_start() inside uvc_v4l2_open(), and the 'users' count should
have been decreased before usb_autopm_put_interface(). In theory, a [URB
resubmission] warning can be triggered when the device is opened just
between usb_autopm_put_interface() and atomic_dec(&stream->dev->users).
The fix is trivial.

Reported-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:32:21 -02:00
Ezequiel Garcia
8c0d44e250 [media] uvcvideo: Replace memcpy with struct assignment
This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:31:36 -02:00
Wei Yongjun
5d97046a37 [media] davinci: vpbe: fix missing unlock on error in vpbe_initialize()
Add the missing unlock on the error handling path in function
vpbe_initialize().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Prabhakar Lad <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:26:08 -02:00
Lad, Prabhakar
b9f1fbcd0e [media] davinci: dm355: Fix uninitialized variable compiler warnings
drivers/media/platform/davinci/dm355_ccdc.c:593:9: warning: ‘val1’ may be
used uninitialized in this function [-Wuninitialized]
drivers/media/platform/davinci/dm355_ccdc.c:560:6: note: ‘val1’ was declared here
This is a false positive but the compiler has no way to know about it,
so initialize the variable to 0.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:09:55 -02:00
Lad, Prabhakar
c7a857a09f [media] adv7343: use devm_kzalloc() instead of kzalloc()
I2C drivers can use devm_kzalloc() too in their .probe() methods. Doing so
simplifies their clean up paths.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:08:54 -02:00
Lad, Prabhakar
08754d3185 [media] tvp514x: use devm_kzalloc() instead of kzalloc()
I2C drivers can use devm_kzalloc() too in their .probe() methods. Doing so
simplifies their clean up paths.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:08:25 -02:00
Lad, Prabhakar
f3e8e4f1c0 [media] tvp7002: use devm_kzalloc() instead of kzalloc()
I2C drivers can use devm_kzalloc() too in their .probe() methods. Doing so
simplifies their clean up paths.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:08:04 -02:00
Lad, Prabhakar
d41d81983a [media] ths7303: use devm_kzalloc() instead of kzalloc()
I2C drivers can use devm_kzalloc() too in their .probe() methods. Doing so
simplifies their clean up paths.

Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 14:05:06 -02:00
Paul Bolle
b4c13d3df1 [media] saa7164: silence GCC warnings
Compiling the saa7164 driver without CONFIG_VIDEO_ADV_DEBUG set triggers
these GCC warnings:
    drivers/media/pci/saa7164/saa7164-encoder.c:1301:12: warning: ‘saa7164_g_register’ defined but not used [-Wunused-function]
    drivers/media/pci/saa7164/saa7164-encoder.c:1314:12: warning: ‘saa7164_s_register’ defined but not used [-Wunused-function]
Silence these warnings by wrapping these two functions in an "#ifdef
CONFIG_VIDEO_ADV_DEBUG" and "#endif" pair.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-05 13:50:14 -02:00
Alexandre Lissy
24dec5dabf [media] imon: fix Knob event interpretation issues on ARM
Events for the iMon Knob pad where not correctly interpreted on ARM,
resulting in buggy mouse movements (cursor going straight out of the
screen), key pad only generating KEY_RIGHT and KEY_DOWN events.
A reproducer is:
int main(int argc, char ** argv)
{
        char rel_x = 0x00; printf("rel_x:%d @%s:%d\n", rel_x, __FILE__, __LINE__);
        rel_x = 0x0f; printf("rel_x:%d @%s:%d\n", rel_x, __FILE__, __LINE__);
        rel_x |= ~0x0f; printf("rel_x:%d @%s:%d\n", rel_x, __FILE__, __LINE__);
        return 0;
}
(running on x86 or amd64)
$ ./test
rel_x:0 @test.c:6
rel_x:15 @test.c:7
rel_x:-1 @test.c:8
(running on armv6)
rel_x:0 @test.c:6
rel_x:15 @test.c:7
rel_x:255 @test.c:8
Forcing the rel_x and rel_y variables as signed char fixes the issue.

Reference: http://www.arm.linux.org.uk/docs/faqs/signedchar.php

Signed-off-by: Alexandre Lissy <alexandrelissy@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-01 07:13:59 -02:00
Jiri Kosina
617677295b Merge branch 'master' into for-next
Conflicts:
	drivers/devfreq/exynos4_bus.c

Sync with Linus' tree to be able to apply patches that are
against newer code (mvneta).
2013-01-29 10:48:30 +01:00
Greg Kroah-Hartman
422d26b6ec Merge 3.8-rc5 into driver-core-next
This resolves a gpio driver merge issue pointed out in linux-next.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 21:06:30 -08:00
Greg Kroah-Hartman
9f9cba810f Merge 3.8-rc5 into tty-next
This resolves a number of tty driver merge issues found in linux-next

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 13:27:36 -08:00
Thierry Reding
d65e8e4a1c media: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 12:21:46 -08:00
Hans Verkuil
ce4a3d5288 [media] radio: set vfl_dir correctly to fix modulator regression
The vfl_dir field should be set to indicate whether a device can receive
data, output data or can do both. This is used to let the v4l core know
which ioctls should be accepted and which can be refused.
Unfortunately, when this field was added the radio modulator drivers were
not updated: radio modulators transmit and so vfl_dir should be set to
VFL_DIR_TX (or VFL_DIR_M2M in the special case of wl128x).
Because of this omission it is not possible to call g/s_modulator for these
drivers, which effectively renders them useless.
This patch sets the correct vfl_dir value for these drivers, correcting
this bug.
Thanks to Paul Grinberg for bringing this to my attention.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24 18:54:14 -02:00
Mauro Carvalho Chehab
a32f7d1ad3 Merge branch 'v4l_for_linus' into staging/for_v3.9
* v4l_for_linus: (464 commits)
  [media] uvcvideo: Set error_idx properly for S_EXT_CTRLS failures
  [media] uvcvideo: Cleanup leftovers of partial revert
  [media] uvcvideo: Return -EACCES when trying to set a read-only control
  Linux 3.8-rc3
  mm: reinstante dropped pmd_trans_splitting() check
  cred: Remove tgcred pointer from struct cred
  drm/ttm: fix fence locking in ttm_buffer_object_transfer
  ARM: clps711x: Fix bad merge of clockevents setup
  ARM: highbank: save and restore L2 cache and GIC on suspend
  ARM: highbank: add a power request clear
  ARM: highbank: fix secondary boot and hotplug
  ARM: highbank: fix typos with hignbank in power request functions
  ARM: dts: fix highbank cpu mpidr values
  ARM: dts: add device_type prop to cpu nodes on Calxeda platforms
  drm/prime: drop reference on imported dma-buf come from gem
  xen/netfront: improve truesize tracking
  ARM: mx5: Fix MX53 flexcan2 clock
  ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array
  sctp: fix Kconfig bug in default cookie hmac selection
  EDAC: Cleanup device deregistering path
  ...

Conflicts:
	drivers/media/pci/dm1105/dm1105.c
	drivers/media/platform/soc_camera/mx2_camera.c
2013-01-24 18:49:18 -02:00
Linus Torvalds
1496ec13a1 ARM: arm-soc: Fixes for 3.8-rc, take 2
Here's a long-pending fixes pull request for arm-soc (I didn't send one
 in the -rc4 cycle).
 
 The larger deltas are from:
 - A fixup of error paths in the mvsdio driver
 - Header file move for a driver that hadn't been properly converted to
   multiplatform on i.MX, which was causing build failures when included
 - Device tree updates for at91 dealing mostly with their new
   pinctrl setup merged in 3.8 and mistakes in those initial configs
 
 The rest are the normal mix of small fixes all over the place; sunxi,
 omap, imx, mvebu, etc, etc.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRAV2RAAoJEIwa5zzehBx32N0P/AsFOLaVWjuvf3kBZTaZgp3J
 jZjhmAfJ2dQCITA792U2bI0d+gPiXm49EY3KWaNdb7S2UmQ1MwXHhKOwOQSVXli0
 j+qAgVUa4nSsi3FQesKS0zThG/Xr+RsyiJZ2dHu71hendJu5NB1O1hzO4hDEHkMc
 K8NGglKjtGirEiLIoub9ag8E9k5sd8X4nulrEJclon1BoolPcef18Bs96tdPmq/o
 Ss634vBqhzSE8OInFc6RDNzTSM52zXbornr/5xGAvFqQv6L0rSXHPvjeeWVdNjj1
 aNqkOrQOAHWRwTcyHOR0GdJfuAPSUwF+JkBWcUbgmsda7XunFiSb5tKV3FSVbJfN
 pMFvbg/iK+ByhWq8iAOkT7OP64wi++FlOFa39IAiQ1QPRD0j93OlKMp0LjqEEiKd
 Gw8o3X03GWhqoJUlSz40TF0Pvkje1UTk2Y8k2y24I3AnnEAcO5x+5pZYUTOe6x5N
 THqqSMsdKWIibrQJRuOXll/DkS8zcepTHU7o8hyHBKYh7LxdAs4ITQoYZjcU5lse
 HGwldByKfuNlzF3+96Jh9wZsr/9zjD8yovEcQYk37s56T/b7kT0sQm6XGS1dFE8Q
 xQgcXLEUXZLt/79B0bn/5ogh26xswx/3GHgNjL1tJQc/MhbQ6C0bb2bBVoU21qzq
 I5yMMwNSkH8+7+PGPiaQ
 =YDHs
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "Here's a long-pending fixes pull request for arm-soc (I didn't send
  one in the -rc4 cycle).

  The larger deltas are from:

   - A fixup of error paths in the mvsdio driver

   - Header file move for a driver that hadn't been properly converted
     to multiplatform on i.MX, which was causing build failures when
     included

   - Device tree updates for at91 dealing mostly with their new pinctrl
     setup merged in 3.8 and mistakes in those initial configs

  The rest are the normal mix of small fixes all over the place; sunxi,
  omap, imx, mvebu, etc, etc."

* tag 'fixes-for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (40 commits)
  mfd: vexpress-sysreg: Don't skip initialization on probe
  ARM: vexpress: Enable A7 cores in V2P-CA15_A7's Device Tree
  ARM: vexpress: extend the MPIDR range used for pen release check
  ARM: at91/dts: correct comment in at91sam9x5.dtsi for mii
  ARM: at91/at91_dt_defconfig: add at91sam9n12 SoC to DT defconfig
  ARM: at91/at91_dt_defconfig: remove memory specification to cmdline
  ARM: at91/dts: add macb mii pinctrl config for kizbox
  ARM: at91: rm9200: remake the BGA as default version
  ARM: at91: fix gpios on i2c-gpio for RM9200 DT
  ARM: at91/at91sam9x5 DTS: add SCK USART pins
  ARM: at91/at91sam9x5 DTS: correct wrong PIO BANK values on u(s)arts
  ARM: at91/at91-pinctrl documentation: fix typo and add some details
  ARM: kirkwood: fix missing #interrupt-cells property
  mmc: mvsdio: use devm_ API to simplify/correct error paths.
  clk: mvebu/clk-cpu.c: fix memory leakage
  ARM: OMAP2+: omap4-panda: add UART2 muxing for WiLink shared transport
  ARM: OMAP2+: DT node Timer iteration fix
  ARM: OMAP2+: Fix section warning for omap_init_ocp2scp()
  ARM: OMAP2+: fix build break for omapdrm
  ARM: OMAP2: Fix missing omap2xxx_clkt_vps_late_init function calls
  ...
2013-01-24 12:42:50 -08:00
Andreas Regel
6b9e50c463 [media] stv090x: On STV0903 do not set registers of the second path
Sometimes there is a problem when trying to access the non-existing registers
of the second demodulator path on the STV0903.

This change removes the calls in case the driver is used on a STV0903.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24 18:31:00 -02:00
Mauro Carvalho Chehab
f67102c49a [media] mb86a20s: remove global BER/PER counters if per-layer counters vanish
If, for any reason, all per-layers counters stop, remove the
corresponding global counter.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24 14:28:32 -02:00
Mauro Carvalho Chehab
d9b6f08a7f [media] mb86a20s: add a logic for post-BER measurement
The logic here is similar to the preBER.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24 14:28:14 -02:00
Mauro Carvalho Chehab
313cf4efa4 [media] mb86a20s: fix the PER reset logic
The logic that resets the device is wrong. It should be resetting
just the layer that got read. Also, stop is needed before updating
the counters.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24 14:27:16 -02:00
Mauro Carvalho Chehab
ad0abbf118 [media] mb86a20s: some fixes at preBER logic
The logic that resets the device is wrong. It should be resetting
just the layer that got read. Also, stop is needed before updating
the counters.
While there, rename it, as we'll soon introduce a postBER logic
there.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24 14:26:55 -02:00
Mauro Carvalho Chehab
593ae89a3f [media] mb86a20s: add block count measures (PER/UCB)
Add both per-layer and global block error count and block count,
for PER and UCB measurements.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-24 14:24:59 -02:00
Mauro Carvalho Chehab
94a93e5f85 [media] dvb_frontend: print a msg if a property doesn't exist
If userspace calls a property that doesn't exist, it currently
just returns -EINVAL. However, this is more likely a problem at
the userspace application, calling it with a non-existing property.
So, add a debug message to help tracking it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23 19:10:57 -02:00
Mauro Carvalho Chehab
25188bd0e6 [media] mb86a20s: add CNR measurement
Add Signal/Noise ratio measurement. On this device, a global measure
is taken by the demod. It also provides per-layer CNR measurements,
based on Modulation Error measures (MER).

Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23 19:10:49 -02:00
Mauro Carvalho Chehab
d01a8ee37a [media] mb86a20s: improve bit error count for BER
Do a better job on setting the bit error counters, in order to
have all layer measures to happen in a little less than one
second.

Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23 19:10:42 -02:00
Mauro Carvalho Chehab
149d518ad0 [media] mb86a20s: add BER measurement
Add the methods to read bit error/bit count measurements from
mb86a20s. On ISDB-T devices, those reads are done per layer.
However, as userspace applications may not be aware of that,
add a global measure that will sum the bit errors and bit
counts for each layer, storing them into a global value.

Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23 19:10:35 -02:00
Mauro Carvalho Chehab
09b6d21e10 [media] mb86a20s: calculate statistics at .read_status()
Instead of providing separate callbacks to read the several FE
stats properties, the better seems to use just one method that will:
    - Read lock status;
    - Read signal strength;
    - if locked, get TMCC data;
    - if locked, get DVB statistics.
As the DVB frontend thread will call this read_status callback
on every 3 seconds, and userspace can even call it earlier,
all stats data and layers layout will be updated together if
available, with is a good thing.

Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23 19:10:27 -02:00
Mauro Carvalho Chehab
7cd4ece58f [media] dvb: the core logic to handle the DVBv5 QoS properties
Add the logic to poll, reset counters and report the QoS stats
to the end user.
The idea is that the core will periodically poll the frontend for
the stats. The frontend may return -EBUSY, if the previous collect
didn't finish, or it may fill the cached data.
The value returned to the end user is always the cached data.

Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23 19:09:52 -02:00
Mauro Carvalho Chehab
f167e302c6 [media] mb86a20s: don't use state before initializing it
As reported by Feng's kbuild test:
	From: kbuild test robot <fengguang.wu@intel.com>
	Subject: drivers/media/dvb-frontends/mb86a20s.c:706 mb86a20s_attach() error: potential null dereference 'state'.  (kzalloc returns null)
	Date: Wed, 23 Jan 2013 19:30:43 +0800

	commit: f66d81b54d [media] mb86a20s: convert it to use dev_info/dev_err/dev_dbg

	drivers/media/dvb-frontends/mb86a20s.c:706 mb86a20s_attach() error: potential null dereference 'state'.  (kzalloc returns null)
	drivers/media/dvb-frontends/mb86a20s.c:706 mb86a20s_attach() error: we previously assumed 'state' could be null (see line 705)

As, at mb86a20s_attach(), we have an i2c pointer, use it for all printk
messages there, instead of state->i2c.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-23 13:22:22 -02:00
Laurent Pinchart
6d1aa02f10 omap3isp: Set cam_mclk rate directly
Now that the cam_mclk rate changes are back-propagated to dpll4_m5_ck we
can set the cam_mclk rate directly instead of manually setting the rate
of the parent clock.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Mike Turquette <mturquette@linaro.org>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Tested-by: Sakari Ailus <sakari.ailus@iki.fi>
2013-01-23 00:44:04 +01:00
Mauro Carvalho Chehab
f66d81b54d [media] mb86a20s: convert it to use dev_info/dev_err/dev_dbg
Instead of having its own set of macros, use the Kernel default
ones for debug, error and info.

While here, do some cleanup on the debug printk's.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22 09:13:08 -02:00
Mauro Carvalho Chehab
dd4493ef34 [media] mb86a20s: Function reorder
Reorder functions to have everything related to stats/status read
close. That will make the file more organized as other stats
routines will be added.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22 08:53:11 -02:00
Mauro Carvalho Chehab
d36e418a7b [media] mb86a20s: Split status read logic from DVB callback
Split the logic that reads the status from the DVB callback. That
helps to properly return an error code, if status read fails.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22 08:49:39 -02:00
Mauro Carvalho Chehab
04585921ac [media] mb86a20s: fix interleaving and FEC retrival
Get the proper bits from the TMCC table registers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22 08:17:38 -02:00
Mauro Carvalho Chehab
ce77d120ed [media] mb86a20s: make AGC work better
It is recommented to change register 0x0440 value to 0, in order
to fix some AGC bug.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22 08:14:03 -02:00
Mauro Carvalho Chehab
fd53744efe [media] mb86a20s: Fix i2c gate on error
If an error happens, restore tuner I2C gate to the right
value.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22 08:12:31 -02:00
Mauro Carvalho Chehab
a77cfcac79 [media] mb86a20s: improve error handling at get_frontend
The read/write errors are not handled well on get_frontend. Fix it,
by letting the frontend cached values to represent the DVB properties
that were successfully retrieved.
While here, use "c" for dtv_frontend_properties cache, instead of
"p", as this is more common.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-22 08:10:52 -02:00
Olof Johansson
b2555b877b ARM i.MX fixes for -rc.
This contains a single compilation fix for the CODA driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABCAAGBQJQ/kpBAAoJEPFlmONMx+ezojIP/16dVFJtilf5YIMYeKVjyiwE
 6wabDdTZK7IMWvESfUZ3Lw9jT8Ean6F0TXSOrQ3aACKUh8w4tx5syvbrH5zOLC9R
 DjsnATY34z4fiMoE2azw+21nVd6RwV8yxZCF6Zn70yJL0oEQuL3vztdnhwhuHxW6
 1We87uq7rSALmkXy26oXsrLo/J8wb8V+xlgGXnWQDMtaYVkf/5vNSAXttEkhid5d
 mByHfB7CZxZ2jMPNyXFEjWwEqAZGyPWOuTDJnFYYV1p8HMej2eqORapacx6dOUNX
 u2Tu+xHLSBEZ64ouHE6E5XxcNYeT1CGkZ8xUL/NzGgGdwySKqA8sFFKduBkFMmWe
 Kd5b1aICLpXtAmNaALXe9s2ANiNpLY2MegYBsltQaKs1/WFE/1eJ518fiS3eOJWA
 asWR8wmxxXLATaOztmB4UQ8jR22sUuAdFYLDpM9AN9I6JKi3flb7/oxLGE6NEUcH
 BX7lopuGifSbYZbHr9rurAkFkF0KGVZtq9xo4Z+dy69IYSrwfYK82PUh5UYaRcoy
 dx51TFB4Nhh7XBlFAzMzIsU1hQaVFjZPKRyrAV+1FG16Fr8R+rvAuA3tdfB81Ncs
 +g9KT3z0ErcjHAyz2hqeIXRR4AnyKmQWk7QfGDM2k3UyY7q9sedyd2TjfeYf0+Lq
 5KjwJSeL/8BtpLujGCMC
 =7H1R
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-rc' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes

From Sascha Hauer:

ARM i.MX fixes for -rc.

This contains a single compilation fix for the CODA driver.

* tag 'imx-fixes-rc' of git://git.pengutronix.de/git/imx/linux-2.6:
  [media] coda: Fix build due to iram.h rename
2013-01-22 00:22:12 -08:00
Kees Cook
e141a48185 drivers/media: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

CC: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:52:44 -08:00
Joe Millenbach
4f73bc4dd3 tty: Added a CONFIG_TTY option to allow removal of TTY
The option allows you to remove TTY and compile without errors. This
saves space on systems that won't support TTY interfaces anyway.
bloat-o-meter output is below.

The bulk of this patch consists of Kconfig changes adding "depends on
TTY" to various serial devices and similar drivers that require the TTY
layer.  Ideally, these dependencies would occur on a common intermediate
symbol such as SERIO, but most drivers "select SERIO" rather than
"depends on SERIO", and "select" does not respect dependencies.

bloat-o-meter output comparing our previous minimal to new minimal by
removing TTY.  The list is filtered to not show removed entries with awk
'$3 != "-"' as the list was very long.

add/remove: 0/226 grow/shrink: 2/14 up/down: 6/-35356 (-35350)
function                                     old     new   delta
chr_dev_init                                 166     170      +4
allow_signal                                  80      82      +2
static.__warned                              143     142      -1
disallow_signal                               63      62      -1
__set_special_pids                            95      94      -1
unregister_console                           126     121      -5
start_kernel                                 546     541      -5
register_console                             593     588      -5
copy_from_user                                45      40      -5
sys_setsid                                   128     120      -8
sys_vhangup                                   32      19     -13
do_exit                                     1543    1526     -17
bitmap_zero                                   60      40     -20
arch_local_irq_save                          137     117     -20
release_task                                 674     652     -22
static.spin_unlock_irqrestore                308     260     -48

Signed-off-by: Joe Millenbach <jmillenbach@gmail.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-18 16:15:27 -08:00
Kees Cook
b9124eaa1b drivers/media/video/s5p-tv: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

CC: Kyungmin Park <kyungmin.park@samsung.com>
CC: Tomasz Stanislawski <t.stanislaws@samsung.com>
CC: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-11 11:38:06 -08:00
Kees Cook
ea2e79fb32 drivers/media/video/s5p-fimc: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

CC: Kyungmin Park <kyungmin.park@samsung.com>
CC: Sylwester Nawrocki <s.nawrocki@samsung.com>
CC: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-11 11:38:06 -08:00
Kees Cook
ba48f1a183 drivers/media/video/pvrusb2: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

CC: Mike Isely <isely@pobox.com>
CC: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-By: Mike Isely <isely@pobox.com>
2013-01-11 11:38:06 -08:00
Kees Cook
2b5d97595f drivers/media/video/cx25821: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

CC: Mauro Carvalho Chehab <mchehab@infradead.org>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-11 11:38:06 -08:00
Kees Cook
51e8cb7454 drivers/media: remove depends on CONFIG_EXPERIMENTAL
The CONFIG_EXPERIMENTAL config item has not carried much meaning for a
while now and is almost always enabled by default. As agreed during the
Linux kernel summit, remove it from any "depends on" lines in Kconfigs.

CC: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-11 11:38:06 -08:00
Tony Lindgren
a62a6e98c3 ARM: OMAP2+: Disable code that currently does not work with multiplaform
We still need to fix up few places for multiplatform support,
but that can proceed separately. Fix the issue by making the
problem drivers depends !ARCH_MULTIPLATFORM for now.

The remaining pieces that are not multiplatform compatible
for omap2+ SoCs are:

1. Some drivers are using custom omap_dm_timer calls

There are two drivers that are directly usign omap hardware
timers for PWM and DSP clocking: drivers/media/rc/ir-rx51.c and
drivers/staging/tidspbridge/core/dsp-clock.c. These can be
fixed for multiplatform by allowing a minimal set of hardware
timers to be accessed, and for some functionality by using the
hrtimer framework.

2. Hardware OMAP4_ERRATA_I688 needs to be fixed up

This can't be enabled for multiplatform configurations in
it's current form. It may be possible to fix it up to do
instruction replacement early on during init. Luckily it
looks like this errata does not seem to get hit with
mainline kernel code alone at least currently.

3. Legacy header needed for omap-sham.c

Looks like it still needs mach/irqs.h for omap1 that
does not exist for multiplatform systems. Just ifdef
it for now.

4. Mailbox is waiting to get moved to drivers

Disable it for now to avoid adding a dependency to the
mailbox patches.

Cc: Timo Kokkonen <timo.t.kokkonen@iki.fi>
Cc: Sean Young <sean@mess.org>
Cc: "VĂ­ctor Manuel JĂ¡quez Leal" <vjaquez@igalia.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Omar Ramirez Luna <omar.ramirez@ti.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
[tony@atomide.com: updated to disable mailbox]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2013-01-11 11:24:20 -08:00
Laurent Pinchart
68d6f84ba0 [media] uvcvideo: Set error_idx properly for S_EXT_CTRLS failures
The uvc_set_ctrl() calls don't write to the hardware. A failure at that
point thus leaves the device in a clean state, with no control modified.
Set the error_idx field to the count value to reflect that, as per the
V4L2 specification.
TRY_EXT_CTRLS is unchanged and the error_idx field must always be set to
the failed control index in that case.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-11 13:30:27 -02:00
Laurent Pinchart
29005c09f4 [media] uvcvideo: Cleanup leftovers of partial revert
Commit ba68c8530a263dc4de440fa10bb20a1c5b9d4ff5 (Partly revert "[media]
uvcvideo: Set error_idx properly for extended controls API failures")
missed two modifications. Clean them up.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-11 13:30:14 -02:00
Laurent Pinchart
9bf42300e6 [media] uvcvideo: Return -EACCES when trying to set a read-only control
Commit ba68c8530a263dc4de440fa10bb20a1c5b9d4ff5 (Partly revert "[media]
uvcvideo: Set error_idx properly for extended controls API failures")
also reverted part of commit 30ecb936cb
("uvcvideo: Return -EACCES when trying to access a read/write-only
control") by mistake. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-11 13:30:01 -02:00
Mauro Carvalho Chehab
734d1ece37 Linux 3.8-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJQ7i67AAoJEHm+PkMAQRiGWb4H/jpPGtPKMRNodz3pD6EEvr11
 vUibqULkQk8ZZiFw/y19We2DqfIF8g578B/db55FzE22yQi3whnpxUE2O+x0zSDy
 SeKEDzujVU7TCXflBQ28qDB+P/1u7zLIHhnLltNrx3cqSmzNOmD+482W25UW8YBR
 FgIVDjVWxVc0ZANF0GozajafJvs9DPzxwZo5CRYnxJ/wgnYFMr8QwdILCYW1r75N
 aeojIRcp0s4PHe+SzL1grdTSNdNx/bi5bENmVCzTkOlrXMZbPkYluqJUHjzj8Yt3
 BuE1FPeK1AKudXkOCo4Vgu7W7Yw1jnal33bAXKLkoHuN1dT7HgyZvLZZdl0b3wE=
 =XdP/
 -----END PGP SIGNATURE-----

Merge tag 'v3.8-rc3' into v4l_for_linus

Linux 3.8-rc3

* tag 'v3.8-rc3': (11110 commits)
  Linux 3.8-rc3
  mm: reinstante dropped pmd_trans_splitting() check
  cred: Remove tgcred pointer from struct cred
  drm/ttm: fix fence locking in ttm_buffer_object_transfer
  ARM: clps711x: Fix bad merge of clockevents setup
  ARM: highbank: save and restore L2 cache and GIC on suspend
  ARM: highbank: add a power request clear
  ARM: highbank: fix secondary boot and hotplug
  ARM: highbank: fix typos with hignbank in power request functions
  ARM: dts: fix highbank cpu mpidr values
  ARM: dts: add device_type prop to cpu nodes on Calxeda platforms
  drm/prime: drop reference on imported dma-buf come from gem
  xen/netfront: improve truesize tracking
  ARM: mx5: Fix MX53 flexcan2 clock
  ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array
  sctp: fix Kconfig bug in default cookie hmac selection
  EDAC: Cleanup device deregistering path
  EDAC: Fix EDAC Kconfig menu
  EDAC: Fix kernel panic on module unloading
  ALSA: hda - add mute LED for HP Pavilion 17 (Realtek codec)
  ...
2013-01-11 13:28:19 -02:00
Stephen Rothwell
3151d14aa6 [media] media: remove __dev* annotations
Hi Mauro,
After merging the v4l-dvb tree, today's linux-next build (x86_64
allmodconfig) failed like this:
drivers/media/platform/sh_veu.c:1146:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sh_veu_probe'
drivers/media/platform/sh_veu.c:1228:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sh_veu_remove'
drivers/media/platform/sh_veu.c:1244:2: error: implicit declaration of function '__devexit_p' [-Werror=implicit-function-declaration]
drivers/media/platform/sh_veu.c:1244:25: error: 'sh_veu_remove' undeclared here (not in a function)
drivers/media/platform/sh_veu.c: In function 'sh_veu_init':
drivers/media/platform/sh_veu.c:1253:45: error: 'sh_veu_probe' undeclared (first use in this function)
drivers/media/platform/sh_veu.c:1253:45: note: each undeclared identifier is reported only once for each function it appears in
drivers/media/platform/sh_veu.c: At top level:
drivers/media/platform/sh_veu.c:1095:20: warning: 'sh_veu_bh' defined but not used [-Wunused-function]
drivers/media/platform/sh_veu.c:1109:20: warning: 'sh_veu_isr' defined but not used [-Wunused-function]
drivers/media/platform/sh_veu.c: In function 'sh_veu_init':
drivers/media/platform/sh_veu.c:1254:1: warning: control reaches end of non-void function [-Wreturn-type]
Caused by commit 05efa71bdc ("[media] media: add a VEU MEM2MEM format
conversion and scaling driver") interacting with commit 54b956b903
("Remove __dev* markings from init.h") from the driver-core.current tree.
I have applied the following merge fix patch which could be applied
directly to the v4l-dvb tree (please):
CONFIG_HOTPLUG is always true now and the __dev* macros have meen removed.

Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-11 13:03:24 -02:00
Sascha Hauer
e909c682d0 [media] coda: Fix build due to iram.h rename
commit c045e3f13 (ARM: imx: include iram.h rather than mach/iram.h) changed the
location of iram.h, which causes the following build error when building the coda
driver:

drivers/media/platform/coda.c:27:23: error: mach/iram.h: No such file or directory
drivers/media/platform/coda.c: In function 'coda_probe':
drivers/media/platform/coda.c:2000: error: implicit declaration of function 'iram_alloc'
drivers/media/platform/coda.c:2001: warning: assignment makes pointer from integer without a cast
drivers/media/platform/coda.c: In function 'coda_remove':
drivers/media/platform/coda.c:2024: error: implicit declaration of function 'iram_free'

Since the content of iram.h is not imx specific, move it to
include/linux/platform_data/imx-iram.h instead. This is an intermediate solution
until the i.MX iram allocator is converted to the generic SRAM allocator.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-08 09:44:06 +01:00
Laurent Pinchart
216c82c6ab [media] omap3isp: Don't include <plat/cpu.h>
The plat/*.h headers are not available to drivers in multiplatform
kernels. As the header isn't needed, just remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 11:10:42 -02:00
Evgeny Plehov
73ec66c000 [media] stv0900: Multistream support
Multistream support for stv0900. For Netup Dual S2 CI with STV0900BAC/AAC.

Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 11:08:44 -02:00
Al Viro
55ee64b30a [media] omap_vout: find_vma() needs ->mmap_sem held
Walking rbtree while it's modified is a Bad Idea(tm); besides,
the result of find_vma() can be freed just as it's getting returned
to caller.  Fortunately, it's easy to fix - just take ->mmap_sem a bit
earlier (and don't bother with find_vma() at all if virtp >= PAGE_OFFSET -
in that case we don't even look at its result).

While we are at it, what prevents VIDIOC_PREPARE_BUF calling
v4l_prepare_buf() -> (e.g) vb2_ioctl_prepare_buf() -> vb2_prepare_buf() ->
__buf_prepare() -> __qbuf_userptr() -> vb2_vmalloc_get_userptr() -> find_vma(),
AFAICS without having taken ->mmap_sem anywhere in process?  The code flow
is bloody convoluted and depends on a bunch of things done by initialization,
so I certainly might've missed something...

Cc: stable@vger.kernel.org [2.6.35]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Archit Taneja <archit@ti.com>
Cc: Prabhakar Lad <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 11:01:06 -02:00
Malcolm Priestley
a0a030bdbe [media] ts2020: call get_rf_strength from frontend
Restore ds3000.c read_signal_strength.
Call tuner get_rf_strength from frontend read_signal_strength.
We are able to do a NULL check and doesn't limit the tuner
attach to the frontend attach area.
At the moment the lmedm04 tuner attach is stuck in frontend
attach area.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:49:38 -02:00
Sakari Ailus
668a8b3b57 [media] v4l: Don't compile v4l2-int-device unless really needed
Add a configuration option for v4l2-int-device so it is only compiled when
necessary, which is only by omap24xxcam and tcm825x drivers.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:46:40 -02:00
Frank Schaefer
5e8d02bb34 [media] em28xx: fix audio input for TV mode of device Terratec Cinergy 250
Remy Blank reported that audio over USB can be made working for the television
input if .amux is changed from EM28XX_AMUX_LINE_IN to EM28XX_AMUX_VIDEO.
An examination of his devices shows, that it is indeed supplied with an EM202
AC97 audio IC. We also use this setting for the Cinergy 200.
Remy Blank also provided the original version of this patch (many thanks !).
Fixes bug 14126 (see bug report for further device details).

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Remy Blank <remy.blank@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:45:53 -02:00
Dan Carpenter
c4fe29a32f [media] dvb: unlock on error in dvb_ca_en50221_io_do_ioctl()
We recently pushed the locking down into this function, but there was
an error path where the unlock was missed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:44:45 -02:00
Malcolm Priestley
9898df6482 [media] ts2020.c: ts2020_set_params [BUG] point to fe->tuner_priv
Fixes corruption of fe->demodulator_priv

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:43:46 -02:00
Jiri Slaby
a96fbe0429 [media] dib0700: do not lock interruptible on tear-down paths
When mutex_lock_interruptible is used on paths where a signal can be
pending, the device is not closed properly and cannot be reused.
This usually happens when you start tzap for example and send it a
TERM signal. The signal is pending while tear-down routines are
called. Hence streaming is not properly stopped in that case. And
the device stops working from that moment on.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:42:33 -02:00
Antti Palosaari
9db15638e1 [media] rtl28xxu: correct some device names
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:26:31 -02:00
Alexander Inyukhin
78a5e70919 [media] rtl28xxu: add Gigabyte U7300 DVB-T Dongle
Device with ID 1b80:d393 is the Gigabyte U7300 DVB-T dongle.
It contains decoder Realtek RTL2832U and tuner Fitipower FC0012.

[crope@iki.fi: fix trivial merge conflict]
Signed-off-by: Alexander Inyukhin <shurick@sectorb.msk.ru>
Signed-off-by: Antti Palosaari <crope@iki.fi>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:26:15 -02:00
Antti Palosaari
3971e79a87 [media] rtl28xxu: [1b80:d3a8] ASUS My Cinema-U3100Mini Plus V2
RF-tuner is Fitipower FC0013

Reported-by: Renato Gallo <renatogallo@unixproducts.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:25:43 -02:00
Antti Palosaari
37b44a0f04 [media] dvb_usb_v2: use IS_ENABLED() macro
replace:
 #if defined(CONFIG_RC_CORE) || defined(CONFIG_RC_CORE_MODULE)
with:
 #if IS_ENABLED(CONFIG_RC_CORE)

Reported-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:20:13 -02:00
Antti Palosaari
ac1c86c857 [media] dvb_usb_v2: change rc polling active/deactive logic
Use own flag to mark when rc polling is active/deactive and make
decisions, like start/stop polling on suspend/resume, against that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:20:03 -02:00
Antti Palosaari
ef3824029d [media] dvb_usb_v2: use dummy function defines instead stub functions
I think it is better (cheaper) to use dummy defines for functions
that has no meaning when remote controller is disabled by Kconfig.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:19:55 -02:00
Antti Palosaari
21354c6de3 [media] dvb_usb_v2: remove rc-core stub implementations
Those are not needed anymore as all dvb-usb-v2 drivers has proper
dependency checks for RC-core.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:18:24 -02:00
Antti Palosaari
21ca203036 [media] it913x: remove unused define and increase module version
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:18:11 -02:00
Antti Palosaari
b963c2083a [media] it913x: make remote controller optional
Do not compile remote controller when RC-core is disabled by Kconfig.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:17:36 -02:00
Antti Palosaari
7b75322af1 [media] az6007: make remote controller optional
Do not compile remote controller when RC-core is disabled by Kconfig.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:17:26 -02:00
Antti Palosaari
eed5670a31 [media] af9035: make remote controller optional
Do not compile remote controller when RC-core is disabled by Kconfig.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:17:18 -02:00
Antti Palosaari
b6215596b5 [media] af9015: make remote controller optional
Do not compile remote controller when RC-core is disabled by Kconfig.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:16:59 -02:00
Antti Palosaari
d5c6209068 [media] anysee: make remote controller optional
Do not compile remote controller when RC-core is disabled by Kconfig.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:16:50 -02:00
Antti Palosaari
cedda37015 [media] rtl28xxu: make remote controller optional
Do not compile remote controller when RC-core is disabled by Kconfig.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:15:30 -02:00
Antti Palosaari
0c87c66aa3 [media] dvb_usb_v2: make remote controller optional
Make it possible to compile dvb_usb_v2 driver without the remote
controller (RC-core).

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 10:15:07 -02:00
Sylwester Nawrocki
24b9f50170 [media] V4L: Remove deprecated image centering controls
It has been over 3 years since the V4L2_CID_[HV]CENTER were deprecated.
Clean up the DocBook and remove the V4L2_CID_VCENTER_DEPRECATED,
V4L2_CID_VCENTER_DEPRECATED control related paragraphs.
Remove the V4L2_CID_[HV]CENTER controls definitions from v4l2-controls.h,
these controls are not used by any driver in the mainline now.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:59:47 -02:00
Kamil Debski
1b73ba0be4 [media] s5p-mfc: Context handling in open() bugfix
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:59:20 -02:00
Kamil Debski
317b4ca498 [media] s5p-mfc: Change internal buffer allocation from vb2 ops to dma_alloc_coherent
Change internal buffer allocation from vb2 memory ops call to direct
calls of dma_alloc_coherent. This change shortens the code and makes it
much more readable.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:59:02 -02:00
Kamil Debski
ef89fff874 [media] s5p-mfc: Correct check of vb2_dma_contig_init_ctx return value
vb2_dma_contig_init_ctx returns an error if failed, NULL check is not necessary.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:58:24 -02:00
Kamil Debski
2e731e443f [media] s5p-mfc: Move firmware allocation point to avoid allocation problems
Move firmware allocation from open to probe to avoid problems
when using CMA for allocation. In certain circumstances CMA may allocate
buffer that is not in the beginning of the MFC memory area.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:57:57 -02:00
Sachin Kamat
4a9c85aa49 [media] s5p-mfc: Fix an error check
Checking unsigned variable for negative value always returns false.
Hence make this value signed as we expect it to be negative too.
Fixes the following smatch warning:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:572
s5p_mfc_set_enc_ref_buffer_v6() warn: unsigned 'buf_size1' is never
less than zero.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:57:09 -02:00
Sachin Kamat
b311ea4bf1 [media] s5p-mfc: Fix a typo in error message in s5p_mfc_pm.c
Fixed a trivial typo.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:56:16 -02:00
Sachin Kamat
55e2cf34ba [media] s5p-mfc: Remove redundant 'break'
The code returns before this statement. Hence not required.
Silences the following smatch message:
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c:525
s5p_mfc_set_dec_frame_buffer_v5() info: ignoring unreachable code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:55:09 -02:00
Arun Kumar K
8f23cc0222 [media] s5p-mfc: Flush DPB buffers during stream off
Flushing of delay DPB buffers have to be done during stream off.
In MFC v6, it is done with a risc to host command.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Arun Mankuzhi <arun.m@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:54:55 -02:00
Wei Yongjun
20fe1cf081 [media] s5p-mfc: remove unused variable
The variable index is initialized but never used
otherwise, so remove the unused variable.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:53:34 -02:00
Arun Kumar K
b27a23be0d [media] s5p-mfc: Add device tree support
This patch will add the device tree support for MFC driver.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:50:38 -02:00
Shaik Ameer Basha
371a664eea [media] exynos-gsc: Support dmabuf export buffer
This patch adds the dmabuf export buffer feature to the
Exynos G-Scaler driver.

Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:42:33 -02:00
Tony Prisk
15514fb567 [media] s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL
Replace IS_ERR_OR_NULL with IS_ERR on clk_get results.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:41:40 -02:00
Sachin Kamat
d322bb9154 [media] s5p-tv: Add missing braces around sizeof in hdmi_drv.c
Fixes the following checkpatch warnings:
WARNING: sizeof *fmt should be sizeof(*fmt)
WARNING: sizeof *res should be sizeof(*res)
WARNING: sizeof *res should be sizeof(*res)
WARNING: sizeof sd->name should be sizeof(sd->name)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:41:11 -02:00
Sachin Kamat
45b56d572c [media] s5p-tv: Add missing braces around sizeof in hdmiphy_drv.c
Fixes the following checkpatch warning:
WARNING: sizeof *ctx should be sizeof(*ctx)
FILE: media/platform/s5p-tv/hdmiphy_drv.c:287:
	ctx = kzalloc(sizeof *ctx, GFP_KERNEL);

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:37:40 -02:00
Sachin Kamat
dc03398528 [media] s5p-tv: Add missing braces around sizeof in mixer_drv.c
Silences checkpatch warnings of type:
WARNING: sizeof mdev->res should be sizeof(mdev->res)
FILE: media/platform/s5p-tv/mixer_drv.c:301:
	memset(&mdev->res, 0, sizeof mdev->res);
WARNING: sizeof *mdev should be sizeof(*mdev)
FILE: media/platform/s5p-tv/mixer_drv.c:385:
	mdev = kzalloc(sizeof *mdev, GFP_KERNEL);

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:36:49 -02:00
Sachin Kamat
ad84291c6a [media] s5p-tv: Add missing braces around sizeof in mixer_reg.c
Silences checkpatch warnings of the type:
WARNING: sizeof filter_y_horiz_tap8 should be sizeof(filter_y_horiz_tap8)
FILE: media/platform/s5p-tv/mixer_reg.c:473:
		filter_y_horiz_tap8, sizeof filter_y_horiz_tap8);

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:36:33 -02:00
Sachin Kamat
c0d5120429 [media] s5p-tv: Add missing braces around sizeof in mixer_video.c
Silences several checkpatch warnings of the type:
WARNING: sizeof *out should be sizeof(*out)
FILE: media/platform/s5p-tv/mixer_video.c:98:
		out = kzalloc(sizeof *out, GFP_KERNEL);

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:36:17 -02:00
Sachin Kamat
80f0dee21c [media] s5p-tv: Add missing braces around sizeof in sdo_drv.c
Silences the following checkpatch warnings:
WARNING: sizeof *sdev should be sizeof(*sdev)
FILE: media/platform/s5p-tv/sdo_drv.c:304:
	sdev = devm_kzalloc(&pdev->dev, sizeof *sdev, GFP_KERNEL);
WARNING: sizeof sdev->sd.name should be sizeof(sdev->sd.name)
FILE: media/platform/s5p-tv/sdo_drv.c:394:
	strlcpy(sdev->sd.name, "s5p-sdo", sizeof sdev->sd.name);

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:35:55 -02:00
Tony Prisk
aeae3db1c2 [media] s5p-tv: Fix incorrect usage of IS_ERR_OR_NULL
Replace IS_ERR_OR_NULL with IS_ERR on clk_get results.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:34:50 -02:00
Sylwester Nawrocki
cf48f56c27 [media] s5p-tv: Fix return value in sdo_probe() on error paths
Use proper return value test for clk_get() and devm_regulator_get()
functions and propagate any errors from the clock and the regulator
subsystem to the driver core. In two cases a proper error code is
now returned rather than 0.

Reported-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:33:34 -02:00
Sylwester Nawrocki
740ad921f8 [media] s5p-fimc: Prevent AB-BA deadlock during links reconfiguration
This patch patch eliminates potential AB-BA deadlock when one process calls
open(), or VIDIOC_S/TRY_FMT ioctl  on the FIMC capture video node, while
other thread is reconfiguring media links via media device node:
/dev/video? open()		  /dev/media? MEDIA_IOC_SETUP_LINK ioctl
mutex_lock(video_lock)            mutex_lock(graph_lock)
    fimc_pipeline_open()               fimc_md_link_notify()
        mutex_lock(graph_lock)	          mutex_lock(video_lock)
          ...                               ...
The deadlock is avoided by always taking the graph mutex first in video
node open() or an ioctl, before the video lock is acquired. Reversed
order seems impossible, since media device driver's link_notify callback
is called with media graph mutex already held.
To ensure proper locking order VIDIOC_S_FMT and VIDIOC_TRY_FMT ioctls are
not serialized in the v4l2-core and the driver takes care of it itself.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:26:20 -02:00
Tony Prisk
dc3ae32879 [media] s5p-fimc: Fix incorrect usage of IS_ERR_OR_NULL
Replace IS_ERR_OR_NULL with IS_ERR on clk_get results.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:25:41 -02:00
Sylwester Nawrocki
a8697ec8c7 [media] s5p-fimc: Prevent potential buffer overflow
Replace the hard coded csi_sensors[] array size with a relevant
constant to make sure we don't iterate beyond the actual array.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:24:43 -02:00
Sylwester Nawrocki
6612545ffb [media] s5p-fimc: Avoid possible NULL pointer dereference in set_fmt op
This fixes following issue found with a static analysis tool:
Pointer 'ffmt' returned from call to function 'fimc_capture_try_format'
at line 1522 may be NULL and may be dereferenced at line 1535.
Although it shouldn't happen in practice, add the NULL pointer check
to be on the safe side.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:23:56 -02:00
Kamil Debski
7296e25f6e [media] s5p-mfc: Fix interrupt error handling routine
New context states were added but handling in s5p_mfc_handle_error for
these states was not. After this patch these states are be handled
correctly.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:21:00 -02:00
Sylwester Nawrocki
a26860bdbd [media] s5p-fimc: Fix return value of __fimc_md_create_flite_source_links()
Make sure 'ret' is not used uninitialized.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:20:28 -02:00
Sylwester Nawrocki
12861dc659 [media] m5mols: Fix typo in get_fmt callback
The check of return value from __find_format() was inverted
by mistake. This patch fixes regression introduced in commit
5565a2ad47 [media] m5mols: Protect driver data with a mutex

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:20:13 -02:00
Laurent Pinchart
ac706bf75c [media] v4l: vb2: Set data_offset to 0 for single-plane output buffers
Single-planar V4L2 buffers are converted to multi-planar vb2 buffers
with a single plane when queued. The plane data_offset field is not
available in the single-planar API and must be set to 0 for all output
buffers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:19:57 -02:00
Antti Palosaari
ff4e3fe86f [media] af9035: print warning when firmware is bad
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:10:34 -02:00
Antti Palosaari
864c714392 [media] af9033: update fc2580 init sequence
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:10:12 -02:00
Antti Palosaari
0353d6b1cd [media] af9033: update fc0011 init sequence
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:10:02 -02:00
Antti Palosaari
2c37d37fc6 [media] af9033: update tua9001 init sequence
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:09:46 -02:00
Antti Palosaari
d267d27091 [media] af9033: update demod init sequence
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:09:24 -02:00
Antti Palosaari
c5dc3b98ff [media] fc0012: remove unused callback and correct one comment
There is no need to keep dummy sleep() callback implementation as
DVB-core checks existence of it before calls callback. Due to that
we can remove it.
FC0012 is based of direct-conversion receiver architecture
(aka Zero-IF) where is no IF used. Due to that IF is always 0 Hz.
Fix comment to point that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:09:06 -02:00
Antti Palosaari
4562620159 [media] fc0012: use Kernel dev_foo() logging
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:08:23 -02:00
Antti Palosaari
44ff69cd95 [media] fc0012: rework attach() to check chip id and I/O errors
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:07:57 -02:00
Antti Palosaari
3a98477200 [media] fc0012: use config directly from the config struct
No need to copy config to the driver state. Those are coming from
the const struct and could be used directly.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:07:28 -02:00
Antti Palosaari
0bb3d8ac87 [media] af9035: add support for fc0012 dual tuner configuration
That adds support for AF9035 dual devices having FC0012 tuners.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:06:59 -02:00
Antti Palosaari
3b0d51afa0 [media] fc0012: enable clock output on attach()
We need feed clock to slave demodulator at the very beginning
in case of dual tuner configuration.
I am not sure if that configuration changes clock output divider
or enable clock output itself...

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:06:31 -02:00
Antti Palosaari
71b1e82794 [media] fc0012: add RF loop through
Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:05:59 -02:00
Antti Palosaari
ad3a758bb3 [media] fc0012: use struct for driver config
I need even more configuration options and overloading dvb_attach()
for all those sounds quite stupid. Due to that switch struct and make
room for new options.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:04:57 -02:00
Antti Palosaari
bf97b6373b [media] af9035: dual mode related changes
Various small changes and fixes releated to dual mode.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:04:17 -02:00
Jose Alberto Reguero
9805992ffc [media] af9035: dual mode support
Adds initial support for af9035 dual mode designs.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
[crope@iki.fi: fix merge conflict]
Signed-off-by: Antti Palosaari <crope@iki.fi>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:03:00 -02:00
Antti Palosaari
7e0bc29603 [media] af9035: support for Fitipower FC0012 tuner devices
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 09:00:26 -02:00
Antti Palosaari
e713ad1549 [media] af9033: add support for Fitipower FC0012 tuner
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 08:58:14 -02:00
Mauro Carvalho Chehab
ef85cd9cd5 [media] em28xx: enable DMABUF
Now that it uses videobuf2, em28xx can support DMABUF.

Tested with an HVR-950 on analog mode and a 2gen i5core machine
with an i915 graphics adapter.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-06 00:34:22 -02:00
Mauro Carvalho Chehab
2c46bb119f [media] ngene: fix commit 36a495a336
The above commit were applied only partially; it broke tuner and
demod attach, but the part that added it to ngene_info was missing.

Not sure what happened there, but, without this patch, a regression
would be happening.

Also, gcc complains about a defined but not used symbol.

So, apply manually the missing part.

Cc: Patrice Chotard <patricechotard@free.fr>
Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 02:06:58 -02:00
Fabio Estevam
39793c6900 [media] mx2_camera: Convert it to platform driver
Converting it to platform code can make the code smaller.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:52:06 -02:00
Javier Martin
3fdd97973b [media] mx2_camera: Remove buffer states
After removing i.mx25 support and buf_cleanup() callback,
buffer states are not used in the code any longer.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:48:06 -02:00
Javier Martin
22f9a477a2 [media] mx2_camera: Remove 'buf_cleanup' callback
All necessary tasks to end the streaming properly are
already implemented in mx2_stop_streaming() and nothing
remains to be done in this callback.
Furthermore, it only included debug messages so it can
be removed.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:47:47 -02:00
Javier Martin
9b55695322 [media] mx2_camera: Remove i.mx25 support
i.MX25 support has been broken for several releases
now and nobody seems to care about it.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
[g.liakhovetski@gmx.de: rebased on top of cpu_is_mx27() removal]
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:47:16 -02:00
Guennadi Liakhovetski
70e176a5a9 [media] soc-camera: use devm_kzalloc in subdevice drivers
I2C drivers can use devm_kzalloc() too in their .probe() methods. Doing so
simplifies their clean up paths.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:45:31 -02:00
Guennadi Liakhovetski
25a3481100 [media] soc-camera: split struct soc_camera_link into host and subdevice parts
struct soc_camera_link currently contains fields, used both by sensor and
bridge drivers. To make subdevice driver re-use simpler, split it into a
host and a subdevice parts.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:38:02 -02:00
Guennadi Liakhovetski
dd669e907c [media] soc-camera: remove struct soc_camera_device::video_lock
Currently soc-camera has a per-device node lock, used for video operations
and a per-host lock for code paths, modifying host's pipeline. Manipulating
the two locks increases complexity and doesn't bring any advantages. This
patch removes the per-device lock and uses the per-host lock for all
operations.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:36:23 -02:00
Guennadi Liakhovetski
8a97d4c117 [media] soc-camera: fix repeated regulator requesting
Currently devm_regulator_bulk_get() is called by soc-camera during host
driver probing, but regulators are attached to the camera platform
device, that is staying, independent whether the host probed successfully
or not. This can lead to repeated regulator requesting, if the host
driver is re-probed. Move the call to platform device probing to avoid
this.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:35:54 -02:00
Guennadi Liakhovetski
7d051b35d5 [media] soc-camera: properly fix camera probing races
The recently introduced host_lock causes lockdep warnings, besides, list
enumeration in scan_add_host() must be protected by holdint the list_lock.
OTOH, holding .video_lock in soc_camera_open() isn't enough to protect
the host during its building of the pipeline, because .video_lock is per
soc-camera device. If, e.g. more than one sensor can be attached to a host
and the user tries to open both device nodes simultaneously, host's .add()
method can be called simultaneously for both sensors. Fix these problems
by holding list_lock instead of .host_lock in scan_add_host() and taking
it shortly at the beginning of soc_camera_open(), and using .host_lock to
protect host's .add() and .remove() operations only.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:35:35 -02:00
Wei Yongjun
daf16bab1e [media] mt9v022: fix potential NULL pointer dereference in mt9v022_probe()
The dereference to 'icl' should be moved below the NULL test.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:34:59 -02:00
Mauro Carvalho Chehab
3a799c27b3 [media] em28xx: declare em28xx_stop_streaming as static
That fixes the following warning:
	drivers/media/usb/em28xx/em28xx-video.c:611:5: warning: no previous prototype for 'em28xx_stop_streaming' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:32:18 -02:00
Laurent Pinchart
317efce991 [media] v4l: Reset subdev v4l2_dev field to NULL if registration fails
When subdev registration fails the subdev v4l2_dev field is left to a
non-NULL value. Later calls to v4l2_device_unregister_subdev() will
consider the subdev as registered and will module_put() the subdev
module without any matching module_get().
Fix this by setting the subdev v4l2_dev field to NULL in
v4l2_device_register_subdev() when the function fails.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@vger.kernel.org
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:25:22 -02:00
Frank Schaefer
90271964c9 [media] em28xx: consider the message length limitation of the i2c adapter when reading the eeprom
EEPROMs are currently read in blocks of 16 bytes, but the em2800 is limited
to 4 bytes per read. All other chip variants support reading of max. 64 bytes
at once (according to the em258x datasheet; also verified with em2710, em2882,
and em28174).
Since em2800_i2c_recv_bytes() has been fixed to return with -EOPNOTSUPP when
more than 4 bytes are requested, EEPROM reading with this chip is broken.
It was actually broken before that change, too, it just didn't throw an error
because the i2c adapter silently returned trash data (for all reads >1 byte !).

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:19:11 -02:00
Frank Schaefer
45f04e82d0 [media] em28xx: fix+improve+unify i2c error handling, debug messages and code comments
- do not pass USB specific error codes to userspace/i2c-subsystem
- unify the returned error codes and make them compliant with
  the i2c subsystem spec
- check number of actually transferred bytes (via USB) everywehere
- fix/improve debug messages
- improve code comments

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:18:25 -02:00
Frank Schaefer
eaf33c404c [media] em28xx: fix the i2c adapter functionality flags
I2C_FUNC_SMBUS_EMUL includes flag I2C_FUNC_SMBUS_WRITE_BLOCK_DATA which signals
that up to 31 data bytes can be written to the ic2 client.
But the EM2800 supports only i2c messages with max. 4 data bytes.
I2C_FUNC_IC2 should be set if a master_xfer function pointer is provided in
struct i2c_algorithm.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:16:54 -02:00
Frank Schaefer
2fcc82d883 [media] em28xx: fix two severe bugs in function em2800_i2c_recv_bytes()
Function em2800_i2c_recv_bytes() has 2 severe bugs:
1) It does not wait for the i2c read to complete before reading the received message content from the bridge registers.
2) Reading more than 1 byte doesn't work
The former can result in data corruption, the latter always does.
The rewritten code also superseds the content of function
em2800_i2c_check_for_device().
Tested with device "Terratec Cinergy 200 USB".

[mchehab@redhat.com: Fix CodingStyle issues]
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:16:01 -02:00
Frank Schaefer
f5ae371aca [media] em28xx: respect the message size constraints for i2c transfers
The em2800 can transfer up to 4 bytes per i2c message.
All other em25xx/em27xx/28xx chips can transfer at least 64 bytes per message.
I2C adapters should never split messages transferred via the I2C subsystem
into multiple message transfers, because the result will almost always NOT be
the same as when the whole data is transferred to the I2C client in a single
message.
If the message size exceeds the capabilities of the I2C adapter, -EOPNOTSUPP
should be returned.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:13:29 -02:00
Frank Schaefer
6ea887efad [media] em28xx: IR RC: move assignment of get_key functions from *_change_protocol() functions to em28xx_ir_init()
The get_key functions are independent from the selected protocol, so assign
them once only at device initialization.

[mchehab@redhat.com: fix a merge conflict]
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:12:11 -02:00
Frank Schaefer
05fe2175cf [media] em28xx: refactor the code in em28xx_usb_disconnect()
The main purpose of this patch is to move the call of em28xx_release_resources()
after the call of em28xx_close_extension().
This is necessary, because some resources might be needed/used by the extensions
fini() functions when they get closed.
Also mark the device as disconnected earlier in this function and unify the
em28xx_uninit_usb_xfer() calls for analog and digital mode.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:10:13 -02:00
Frank Schaefer
2665c2995d [media] em28xx: simplify device state tracking
DEV_INITIALIZED of enum em28xx_dev_state state is used nowhere and there is no
need for DEV_MISCONFIGURED, so remove this enum and use a boolean field
'disconnected' in the device struct instead.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:09:39 -02:00
Devin Heitmueller
d3829fadc4 [media] em28xx: convert to videobuf2
This patch converts the em28xx driver over to videobuf2.  It is
likely that em28xx_fh can go away entirely, but that will come in
a separate patch.

[mchehab@redhat.com: fix a non-trivial merge conflict with some VBI
 patches; CodingStyle fixes]

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 01:03:38 -02:00
Hans Verkuil
2a221d34b6 [media] em28xx: zero vbi_format reserved array and add try_vbi_fmt
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 00:58:44 -02:00
Hans Verkuil
1d179eeedc [media] em28xx: remove sliced VBI support
The sliced VBI support in the tvp5150 is completely broken. And there is no
support for the saa7115 sliced VBI implementation in the em28xx driver. So
we remove the sliced VBI support completely.
It should be possible to get it to work with the tvp5150, but that will
require someone to really dig into that driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 00:57:50 -02:00
Hans Verkuil
d8c95c08ef [media] em28xx: std fixes: don't implement in webcam mode, and fix std changes
When in webcam mode the STD API shouldn't be implemented.
When changing the standard the resolution wasn't updated, and there was no
check against streaming-in-progress.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 00:56:38 -02:00
Hans Verkuil
7f52979484 [media] tvp5150: remove compat control ops
No longer needed now that em28xx has been converted to the control framework.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 00:55:53 -02:00
Hans Verkuil
86ff7f1d4b [media] em28xx: fill in readbuffers and fix incorrect return code
g/s_parm should fill in readbuffers.
For non-webcams s_parm should return -ENOTTY instead of -EINVAL.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 00:52:36 -02:00
Hans Verkuil
50fdf40f69 [media] em28xx: add support for control events
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 00:51:52 -02:00
Hans Verkuil
69a61642ac [media] em28xx: convert to v4l2_fh, fix priority handling
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 00:51:28 -02:00
Hans Verkuil
081b945ed7 [media] em28xx: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 00:51:05 -02:00
Hans Verkuil
8ac7a9493a [media] v4l2-ctrls: add a notify callback
Sometimes platform/bridge drivers need to be notified when a control from
a sub-device changes value. In order to support this a notify callback was
added.
[dheitmueller@kernellabs.com: fix merge conflict in v4l2-ctrls.c]

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 00:49:54 -02:00
Hans Verkuil
20deebfe17 [media] em28xx: fix tuner/frequency handling
v4l2-compliance found problems with frequency clamping that wasn't
reported correctly and missing tuner index checks.
Also removed unnecessary tuner type checks (these are now done by the
v4l2 core).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 00:47:41 -02:00
Hans Verkuil
319a55fbe4 [media] em28xx: fix VIDIOC_DBG_G_CHIP_IDENT compliance errors
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 00:47:10 -02:00
Hans Verkuil
dd5a436322 [media] em28xx: remove bogus input/audio ioctls for the radio device
Radio devices should not implement those ioctls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 00:46:50 -02:00
Hans Verkuil
a9d79fe581 [media] em28xx: fix querycap
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-05 00:45:43 -02:00
Mauro Carvalho Chehab
3ac693c40a [media] em28xx: tell ir-kbd-i2c that WinTV uses an RC5 protocol
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-04 19:13:24 -02:00
Mauro Carvalho Chehab
d40580e7c0 [media] em28xx: simplify IR names on I2C devices
The ir-i2c-kbd already adds I2C IR before the name. The way it is,
the devices are named as:
	"i2c IR (i2c IR (EM2840 Hauppaug"
With is ugly and incorrect. After this patch, it is now properly
displayed as:
	"i2c IR (WinTV USB2)"

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-04 19:13:19 -02:00
Mauro Carvalho Chehab
728f9778e2 [media] em28xx: autoload em28xx-rc if the device has an I2C IR
If the device has an I2C IR, em28xx-rc should be loaded by default,
except if the user explicitly requested to not load, via modprobe
option.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-04 19:13:14 -02:00
Mauro Carvalho Chehab
8303dc9952 [media] em28xx: initialize button/I2C IR earlier
The em28xx-input is used by 3 different types of input devices:
	- devices with buttons (like cameras and grabber devices);
	- devices with I2C remotes;
	- em2860 or latter chips with RC support embedded.
When the device has an I2C remote, all it needs to do is to call
the proper I2C driver (ir-i2c-kbd), passing the proper data to
it, and just leave the code.
Also, button devices have its own init code that doesn't depend on
having an IR or not (as a general rule, they don't have).
So, move its init code to fix bugs introduced by earlier patches
that prevent them to work.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-01-04 19:13:07 -02:00