Add compat clock helpers

The clk_prepare_enable() and clk_disable_unprepare() clock helpers were
introduced in kernel v3.3. Add them to compat.h for kernels that don't
provide them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
ensure correct install of modules from drivers/{misc,staging}

v4l/scripts/make_mediafile.pl uses the %instdir hash to collate a list
of directories in media_build/linux which contain Makefiles; it uses
this data when constructing a dependency for the Makefile.media target.
It also uses this hash to collate all the individual module names and
generate code which installs the individual modules.
But it gets the installation directory wrong in the case of modules
outside the linux/drivers/media tree.

To fix, do the collation of source locations and conversion into install
locations as separate steps.

Signed-off-by: vincent.mcintyre@gmail.com
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
pt3.h: add diff to backports/no_atomic_include.patch

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Add new undef pr_fmt diffs

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Fix DEBUG clash

The compat build defines DEBUG somewhere, but so do some drivers.
This causes a redefine warning, so fix those drivers by adding
undef DEBUG.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
ST_RC only for kernels >= 3.15

It needs reset_control_get_optional.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
DVB_PT3 for >= 3.11 only

It needs freezable_schedule_hrtimeout_range

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Add missing of.h to ir-hix5hd2.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
ir-hix5hd2: >= 3.10 only

It needs linux/mfd/syscon.h.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
DVB_TC90522/MEDIA_TUNER_QM1D1C0042 only for >= 2.6.37

Needs div64_s64.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Update backports/tda18271_debug_fix.patch

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
MEDIA_TUNER_TDA18212/MEDIA_TUNER_IT913X: need regmap

So compile only for >= 3.4.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
gpiochip_remove became a void function in 3.17

Add error checking for older kernels to prevent warning about unchecked
result value.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
make distclean never removed the .gcno files.

Fix the faulty file pattern.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Always disable COMPILE_TEST

This option makes no sense for the compatibility build.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Look in barrier.h instead of atomic.h.

The NEED_SMP_MB_AFTER_ATOMIC check looked in atomic.h, but it should have looked
in barrier.h. This failed for kernel 3.18.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Update i2c_add_mux_adapter backport patches.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Add compat code for IS_MODULE

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Update backports/v3.4_i2c_add_mux_adapter.patch

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Update backports/v2.6.32_kfifo.patch

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>