[media] s5p-fimc: Don't ignore return value of vb2_queue_init()

Add missing checks for return value of vb2_queue_init(), after
this function has been modified recently to not throw BUG_ON().
This eliminates related compiler warnings,
drivers/media/platform/s5p-fimc/fimc-lite.c: In function fimc_lite_subdev_registered:
drivers/media/platform/s5p-fimc/fimc-lite.c:1256:16: warning: ignoring return value
of vb2_queue_init, declared with attribute warn_unused_result [-Wunused-result]
drivers/media/platform/s5p-fimc/fimc-capture.c: In function fimc_register_capture_device:
drivers/media/platform/s5p-fimc/fimc-capture.c:1739:16: warning: ignoring return value
of vb2_queue_init, declared with attribute warn_unused_result [-Wunused-result]

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>
[media] s5p-csis: Select S5P_SETUP_MIPIPHY

After commit ccbfd1d49dc0d6a "[media] s5p-csis: Replace phy_enable platform.."
s5p-csis depends now on the commmon MIPI CSIS/MIPI DSIM DPHY control code.
Add select S5P_SETUP_MIPIPHY to make this dependency explicit, until
the code from arch/arm/plat-samsung is moved to drivers/ directory and
converted to a regular phy driver module.

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>
[media] s5p-fimc: Fix platform entities registration

Make sure the platform sub-devices are registered to the media
device driver only when v4l2_device_register_subdev() succeeds.

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>
[media] s5p-fimc: Fix potential NULL pointer dereference

'fimc' was being dereferenced before the NULL check.
Moved it to after the check.

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>
[media] dvb-frontends: fix potential NULL pointer dereference in stv0900_set_mclk()

The dereference should be moved below the NULL test.
dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] omap3isp: video: Fix warning caused by bad vidioc_s_crop prototype

Commit 4f996594 ("v4l2: make vidioc_s_crop const") modified the
vidioc_s_crop operation prototype but forgot to update the OMAP3 ISP
driver. Add a const keyword to fix the function prototype.

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>
[media] omap3isp: Fix warning caused by bad subdev events operations prototypes

Remove the const keyword from the V4L2 subdev events operations to match
the V4L2 API.

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>
[media] exynos-gsc: change driver compatible string

As G-Scaler is going to stay unchanged across all exynos5 series
SoCs, changing the driver compatible string name to
"samsung,exynos5-gsc" from "samsung,exynos5250-gsc".
This change is as per the discussion in the devicetree forum.
http://www.mail-archive.com/devicetree-discuss@lists.ozlabs.org/msg16448.html

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>
openvswitch: Print device when warning about over MTU packets.

If an attempt is made to transmit a packet that is over the device's
MTU then we log it using the datapath's name.  However, it is much
more helpful to use the device name instead.

Signed-off-by: Jesse Gross <jesse@nicira.com>
openvswitch: Store flow key len if ARP opcode is not request or reply.

We currently only extract the ARP payload if the opcode indicates
that it is a request or reply.  However, we also only set the
key length in these situations even though it should still be
possible to match on the opcode.  There's no real reason to
restrict the ARP opcode since all have the same format so this
simply removes the check.

Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
[media] dvb_usb_v2: fix pid_filter callback error logging

Code block braces were missing which leds broken error logging and compiler warning.

drivers/media/usb/dvb-usb-v2/dvb_usb_core.c: In function 'dvb_usb_ctrl_feed':
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:291:12: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Milan Tuma <milan.olin@seznam.cz>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[media] dvb_usb_v2: switch interruptible mutex to normal

Fixes error: dvb_usb_v2: pid_filter() failed=-4

error code -4 is EINTR, Interrupted system call

That error blocks I/O in some cases as -EINTR error was returned
by the mutex which was protecting USB control messages. We want
configure hardware to sleep mode on every case after tuning is
stopped. That kind of behavior blocks it, leaving hardware some
unwanted state in worst case.

That error was seen every time when af9015 was plugged to USB1.1
which leads use of hardware PID filters. Stop tuning (tzap) with
ctrl+c failed as driver tries to remove hardware PID filters.

Tested with every hardware which uses routine in question.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
ARM: 7570/1: quiet down the non make -s output

Commit edc88ceb0c7d285b9f58bc29a638cd8163b59989 silenced the make -s build, but
inadvertently made louder the non-silent build.  Fix by prepending '@' to each
of the added $(kecho) statements.

Build with edc88ceb0c7d285b9f58bc29a638cd8163b59989:

  CHK     include/generated/compile.h
echo '  Kernel: arch/arm/boot/Image is ready'
  Kernel: arch/arm/boot/Image is ready
  LD      arch/arm/boot/compressed/vmlinux
  OBJCOPY arch/arm/boot/zImage
echo '  Kernel: arch/arm/boot/zImage is ready'
  Kernel: arch/arm/boot/zImage is ready

Build with this fix:
  CHK     include/generated/compile.h
  Kernel: arch/arm/boot/Image is ready
  LD      arch/arm/boot/compressed/vmlinux
  OBJCOPY arch/arm/boot/zImage
  Kernel: arch/arm/boot/zImage is ready

Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
ARM: 7572/1: proc-v6.S: fix comment

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
mfd: twl-core: Fix chip ID for the twl6030-pwm module

The correct chip id is 1 since the PWM module is on address 0x49. With the
current TWL6030_MODULE_ID1 the kernel will crash early since we have:

 #define TWL6030_MODULE_ID1 0x0E
and
 static struct twl_client twl_modules[4];

Down in the stack we try to get the module by:
struct twl_client	*twl = &twl_modules[chip];

Which is obviously going to do nasty things.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: wm5102: Update register patch for latest evaluation

Latest evaluation of the device has provided some revisions to the
configuration.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: wm5110: Disable control interface error report for WM5110 rev B

It can misreport.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: arizona: Use correct array for ARRAY_SIZE in mfd_add_devices call

wm5102_devs array was used for ARRAY_SIZE whilst adding the wm5110
devices. This change corrects this to get the size from the wm5110_devs
array. As both arrays are the same size no issues should have been
caused by this bug.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: arizona: Correctly report when AIF2/AIF1 is underclocked

In the interrupt handler for an underclocked event, whilst checking for
the source of the interrupt, AIF3 was checked twice and AIF1 was not
checked. This change correctly checks the AIF1 underclocked bit and
reports the correct error messages for all cases.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
mfd: arizona: Sync regcache after reset

In the absence of a physical reset line the chip is reset by writing the
first register, which is done after the register patch has been applied.
This patch synchronises the register cache after the reset to preserve
any register changes that had been applied.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>