openwrt/staging/blogic.git
11 years agopatch library: fix previous patch
Johannes Berg [Tue, 16 Apr 2013 07:56:28 +0000 (09:56 +0200)]
patch library: fix previous patch

I accidentally removed one line too many ...

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: protect vb2_mmap_pfn_range with LINUX_BACKPORT
Johannes Berg [Tue, 16 Apr 2013 07:46:59 +0000 (09:46 +0200)]
backports: protect vb2_mmap_pfn_range with LINUX_BACKPORT

Some kernels apparently have this backported, and it doesn't
hurt to protect the symbol since we patch it in anyway for
those files needing it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agopatch library: don't use -p1 for git patches
Johannes Berg [Tue, 16 Apr 2013 07:45:23 +0000 (09:45 +0200)]
patch library: don't use -p1 for git patches

For git patches, the patch library will automatically use
-p1 and strip the a/ b/ filename prefix, while for other
patches it uses -p0 and doesn't strip anything. We usually
use a/ b/ prefixes even when the patches aren't in the git
format and strip a path in gentree, so remove this from
the library.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackport build system: don't pipe yes '' to defconfig
Johannes Berg [Mon, 15 Apr 2013 23:29:58 +0000 (01:29 +0200)]
backport build system: don't pipe yes '' to defconfig

There's no need to pipe yes '' to make defconfig since
it will not ask for anything anyway, and even if it did
the user should probably be asked ...

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: remove iwlwifi dev_dbg() patch
Johannes Berg [Mon, 15 Apr 2013 21:45:13 +0000 (23:45 +0200)]
backports: remove iwlwifi dev_dbg() patch

This is no longer needed since now the compat headers
don't pre-include half the world any more.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: include asm/unaligned.h into etherdevice.h
Johannes Berg [Mon, 15 Apr 2013 21:30:10 +0000 (23:30 +0200)]
backports: include asm/unaligned.h into etherdevice.h

New kernels do this, and some users rely on it.
This allows getting rid of the cfg80211 and ath6kl
patches to include it directly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: remove unnecessary patches
Johannes Berg [Mon, 15 Apr 2013 21:29:06 +0000 (23:29 +0200)]
backports: remove unnecessary patches

The files these patch already include the headers
that are patched in, so the patches are entirely
unnecessary.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: declare struct inet6_dev in netdevice.h
Johannes Berg [Mon, 15 Apr 2013 21:18:01 +0000 (23:18 +0200)]
backports: declare struct inet6_dev in netdevice.h

This allows us to get rid of the mac80211.h patch to
include net/if_inet6.h to get that declaration. Newer
kernels implicitly declare the struct by using it for
a pointer in struct net_device.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: protect eth_hw_addr_random with LINUX_BACKPORT
Hauke Mehrtens [Mon, 15 Apr 2013 20:47:38 +0000 (22:47 +0200)]
backports: protect eth_hw_addr_random with LINUX_BACKPORT

debian kernel 3.2 backports eth_hw_addr_random and this collides with
our backport without this patch.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoRevert "backports: remove header file patches"
Johannes Berg [Mon, 15 Apr 2013 20:42:11 +0000 (22:42 +0200)]
Revert "backports: remove header file patches"

This reverts commit 41a5d256482183aed7b863bc0bdbf95955cdf23b.

These still seem to be needed ... need to fix first.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agodevel: add back scripts for fetching kernels
Hauke Mehrtens [Mon, 15 Apr 2013 20:35:46 +0000 (22:35 +0200)]
devel: add back scripts for fetching kernels

These scripts are copied from compats bin directory.

I updated the kernels referenced in get-compat-kernels.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: backport class_find_device properly
Johannes Berg [Mon, 15 Apr 2013 20:39:26 +0000 (22:39 +0200)]
backports: backport class_find_device properly

Instead of patching, make a macro that casts the const out
from the function pointer arguments to avoid the warning.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: remove header file patches
Johannes Berg [Mon, 15 Apr 2013 20:26:44 +0000 (22:26 +0200)]
backports: remove header file patches

All that should be handled by the new header files in
the backports, if not we need to fix those.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: remove useless netdev_tx_t patch
Johannes Berg [Mon, 15 Apr 2013 20:23:45 +0000 (22:23 +0200)]
backports: remove useless netdev_tx_t patch

The type netdev_tx_t already gets a typedef to int on old
kernels, so the ifdef in bluetooth code isn't necessary.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: remove change_mtu patches
Johannes Berg [Mon, 15 Apr 2013 20:22:38 +0000 (22:22 +0200)]
backports: remove change_mtu patches

netdev_attach_ops() will already set everything (to NULL unless
the driver has the callback) so these patches aren't needed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: remove network namespace patches
Johannes Berg [Mon, 15 Apr 2013 20:12:56 +0000 (22:12 +0200)]
backports: remove network namespace patches

The network namespace support was ifdef'ed out for
kernels < 2.6.24, but we don't support those any
more so remove the patches.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: remove SET_NETDEV_DEVTYPE patches
Johannes Berg [Mon, 15 Apr 2013 20:08:37 +0000 (22:08 +0200)]
backports: remove SET_NETDEV_DEVTYPE patches

There's no need to have those patches as struct device_type,
with its name field, has been available since kernel 2.6.22.
We can thus make the macro SET_NETDEV_DEVTYPE() an inline
instead (to avoid "unused variable" warnings) and thus get
rid of the patches for it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackport build system: warn if kernel headers aren't there
Johannes Berg [Mon, 15 Apr 2013 18:30:29 +0000 (20:30 +0200)]
backport build system: warn if kernel headers aren't there

When the kernel build system/configuration isn't present, warn
verbosely instead of later failing with crypting errors.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackport build system: make autoconf header depend on Kconfig
Johannes Berg [Mon, 15 Apr 2013 16:03:32 +0000 (18:03 +0200)]
backport build system: make autoconf header depend on Kconfig

If the kernel's configuration changes for some reason or you
change the KLIB path then the Kconfig.kernel file is rebuilt
correctly, but the .config and autoconf header may be left
in inconsistent state. Make the autoconf header make target
depend on the Kconfig.kernel and Kconfig.versions file, this
fixes the issue since then oldconfig will run and the header
will be rebuilt.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoRevert "backports: fix netdev_set_default_ethtool_ops code"
Johannes Berg [Mon, 15 Apr 2013 13:49:05 +0000 (15:49 +0200)]
Revert "backports: fix netdev_set_default_ethtool_ops code"

This reverts commit 91bf647c3a157688ce8e94c0df512cde1b3f5a87.

Also fix the #ifdef for netdev_set_default_ethtool_ops() as
it was backported into kernel 3.7.8.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: fix typo in rndis fix
Johannes Berg [Mon, 15 Apr 2013 13:28:42 +0000 (15:28 +0200)]
backports: fix typo in rndis fix

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackport: allow using backported drivers w/o LEDs
Johannes Berg [Mon, 8 Apr 2013 16:48:52 +0000 (18:48 +0200)]
backport: allow using backported drivers w/o LEDs

When the base kernel has LED support (partially) disabled,
currently many drivers cannot be built. Since LED support
is hardy critical, work around this by providing API stubs
for the LED support code to still compile (but not work.)

This passes allyesconfig (except for some stupid rtlwifi
issue) with next-20130405 against a 3.8 kernel that has
all the LED options disabled.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: fix ifdef in compat-2.6.37.c
Johannes Berg [Mon, 15 Apr 2013 12:18:54 +0000 (14:18 +0200)]
backports: fix ifdef in compat-2.6.37.c

That ifdef got misplaced, vzalloc() shouldn't be inside.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: fix dma-mapping header
Johannes Berg [Mon, 15 Apr 2013 11:57:26 +0000 (13:57 +0200)]
backports: fix dma-mapping header

The contents of our asm-generic/dma-mapping-common.h should really be
in asm/dma-mapping.h as that gets included by linux/dma-mapping.h and
the other one is just a helper header that arches *may* include.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: WL1251 depends on kernel 3.0
Johannes Berg [Mon, 15 Apr 2013 11:53:13 +0000 (13:53 +0200)]
backports: WL1251 depends on kernel 3.0

It requires irq_modify_status() which wasn't previously available.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: fix netdev_set_default_ethtool_ops code
Johannes Berg [Mon, 15 Apr 2013 11:50:01 +0000 (13:50 +0200)]
backports: fix netdev_set_default_ethtool_ops code

This needs to be included for kernel 3.7.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: fix rndis-wlan usb dependencies
Johannes Berg [Mon, 15 Apr 2013 11:37:21 +0000 (13:37 +0200)]
backports: fix rndis-wlan usb dependencies

I included that file always, but then when the copy-list
doesn't contain the drivers/net/usb/ directory it would
fail to build ... fix that by including that directory
only conditionally when USB_NET_RNDIS_WLAN is selected.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: fix pci_platform_rom backport
Johannes Berg [Mon, 15 Apr 2013 10:38:59 +0000 (12:38 +0200)]
backports: fix pci_platform_rom backport

pci_platform_rom() actually made it into 3.9, so
only provide it for kernels before that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: disable drivers needing I2C_CLIENT_SCCB
Johannes Berg [Sun, 14 Apr 2013 00:20:29 +0000 (02:20 +0200)]
backports: disable drivers needing I2C_CLIENT_SCCB

As we can't backport I2C_CLIENT_SCCB easily (it would
require backporting smbus transfers), disable the two
drivers requiring that constant.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: override pm_wakeup_event() on 2.6.36
Johannes Berg [Mon, 15 Apr 2013 08:34:26 +0000 (10:34 +0200)]
backports: override pm_wakeup_event() on 2.6.36

This may not be the right thing to do, but it resolves
linking the TI driver on 2.6.36 where pm_wakeup_event()
is declared but not always exported.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: automatically backport EWMA lib
Johannes Berg [Sat, 13 Apr 2013 23:30:31 +0000 (01:30 +0200)]
backports: automatically backport EWMA lib

Use the scripting to always copy the latest version.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: add vgaarb.h
Johannes Berg [Sat, 13 Apr 2013 21:08:55 +0000 (23:08 +0200)]
backports: add vgaarb.h

This is needed as old versions of it didn't properly
declare struct pci_dev.

Additionally, not all versions included video/vga.h
which causes issues as that pulls in some required
definitions.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: include hardirq into netdevice.h
Johannes Berg [Sat, 13 Apr 2013 20:41:23 +0000 (22:41 +0200)]
backports: include hardirq into netdevice.h

On newer kernels this is included (indirectly) and
unfortunately some drivers rely on it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: avoid vfree() const warning
Johannes Berg [Sat, 13 Apr 2013 13:29:37 +0000 (15:29 +0200)]
backports: avoid vfree() const warning

On newer kernels const pointers can be passed to vfree()
and vunmap(), doing so on old kernels causes warnings
that we can suppress with a cast.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: avoid module parameter warnings
Johannes Berg [Sat, 13 Apr 2013 13:28:38 +0000 (15:28 +0200)]
backports: avoid module parameter warnings

On old kernels, boolean module parameters had to be int.
When we backport, they're bool, and thus cause warnings.
Suppress the warnings by redefining the parameter check,
it's not entirely clear that it'll do the right thing
though?

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: fix USB PM in case of !CONFIG_USB_SUSPEND
Johannes Berg [Sat, 13 Apr 2013 13:19:29 +0000 (15:19 +0200)]
backports: fix USB PM in case of !CONFIG_USB_SUSPEND

Even in this case, the variable is an int on old kernels.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: avoid pr_fmt warning from our export.h
Johannes Berg [Sat, 13 Apr 2013 13:18:04 +0000 (15:18 +0200)]
backports: avoid pr_fmt warning from our export.h

On old kernels, linux/export.h didn't exist and we need
to include linux/module.h instead. That includes a lot
though and thus defines pr_fmt already. Avoid redefine
warnings by checking if it's defined before and if not
undefining it afterwards.

However, to then avoid issues with kernel.h/printk.h
not defining it again, we need to override there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: improve SIMPLE_DEV_PM_OPS macro
Johannes Berg [Sat, 13 Apr 2013 13:17:30 +0000 (15:17 +0200)]
backports: improve SIMPLE_DEV_PM_OPS macro

To avoid warnings on old kernels, improve the macro
and give it some content rather than nothing.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-2.6.26.h
Johannes Berg [Fri, 12 Apr 2013 12:45:19 +0000 (14:45 +0200)]
backports: dissolve compat-2.6.26.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-2.6.27.h
Johannes Berg [Fri, 12 Apr 2013 12:37:05 +0000 (14:37 +0200)]
backports: dissolve compat-2.6.27.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-2.6.28.h
Johannes Berg [Fri, 12 Apr 2013 12:22:50 +0000 (14:22 +0200)]
backports: dissolve compat-2.6.28.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-2.6.29.h
Johannes Berg [Thu, 11 Apr 2013 16:15:40 +0000 (18:15 +0200)]
backports: dissolve compat-2.6.29.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-2.6.30.h
Johannes Berg [Fri, 12 Apr 2013 12:02:47 +0000 (14:02 +0200)]
backports: dissolve compat-2.6.30.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-2.6.31.h
Johannes Berg [Fri, 12 Apr 2013 11:54:42 +0000 (13:54 +0200)]
backports: dissolve compat-2.6.31.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-2.6.32.h
Johannes Berg [Fri, 12 Apr 2013 11:44:03 +0000 (13:44 +0200)]
backports: dissolve compat-2.6.32.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-2.6.33.h
Johannes Berg [Thu, 11 Apr 2013 15:34:46 +0000 (17:34 +0200)]
backports: dissolve compat-2.6.33.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-2.6.34.h
Johannes Berg [Fri, 12 Apr 2013 11:24:58 +0000 (13:24 +0200)]
backports: dissolve compat-2.6.34.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-2.6.35.h
Johannes Berg [Fri, 12 Apr 2013 11:11:17 +0000 (13:11 +0200)]
backports: dissolve compat-2.6.35.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-2.6.36.h
Johannes Berg [Thu, 11 Apr 2013 15:26:57 +0000 (17:26 +0200)]
backports: dissolve compat-2.6.36.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-2.6.37.h
Johannes Berg [Fri, 12 Apr 2013 10:20:45 +0000 (12:20 +0200)]
backports: dissolve compat-2.6.37.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-2.6.38.h
Johannes Berg [Fri, 12 Apr 2013 10:09:58 +0000 (12:09 +0200)]
backports: dissolve compat-2.6.38.h

While at it, fix the SDIO backport because the
max_hw_segs,max_phys_segs -> max_segs change
was really done in 2.6.37, not 2.6.38.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-2.6.39.h
Johannes Berg [Fri, 12 Apr 2013 09:58:10 +0000 (11:58 +0200)]
backports: dissolve compat-2.6.39.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-3.0.h
Johannes Berg [Fri, 12 Apr 2013 09:47:24 +0000 (11:47 +0200)]
backports: dissolve compat-3.0.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-3.1.h
Johannes Berg [Fri, 12 Apr 2013 09:16:36 +0000 (11:16 +0200)]
backports: dissolve compat-3.1.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-3.2.h
Johannes Berg [Fri, 12 Apr 2013 08:55:32 +0000 (10:55 +0200)]
backports: dissolve compat-3.2.h

Also get rid of __netdev_printk() as it's no longer
exported from the kernel and thus can't be used by
any drivers/other backported code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-3.3.h
Johannes Berg [Thu, 11 Apr 2013 16:53:31 +0000 (18:53 +0200)]
backports: dissolve compat-3.3.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-3.4.h
Johannes Berg [Thu, 26 Apr 2012 15:48:07 +0000 (17:48 +0200)]
backports: dissolve compat-3.4.h

This also requires some changes around kconfig.h.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve backport.h
Johannes Berg [Thu, 11 Apr 2013 23:12:15 +0000 (01:12 +0200)]
backports: dissolve backport.h

We'll resolve all the other compat-*.h files next.

To keep it compiling, we now also need to remove all
the pr_fmt patches (they add printk.h which can't be
included as the first header file any more.)

I attempted to simply not include anything from the
command line, but very old kernels (e.g. 2.6.24)
don't include kconfig.h from the command line but
include/linux/autoconf.h directly, and thus won't
get our override. Thus we need to keep a very small
backport.h.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-3.5.h
Johannes Berg [Fri, 12 Apr 2013 08:01:41 +0000 (10:01 +0200)]
backports: dissolve compat-3.5.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-3.6.h
Johannes Berg [Thu, 11 Apr 2013 23:04:27 +0000 (01:04 +0200)]
backports: dissolve compat-3.6.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-3.7.h
Johannes Berg [Thu, 11 Apr 2013 22:25:26 +0000 (00:25 +0200)]
backports: dissolve compat-3.7.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-3.8.h
Johannes Berg [Thu, 11 Apr 2013 22:06:09 +0000 (00:06 +0200)]
backports: dissolve compat-3.8.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-2.6.25.h
Johannes Berg [Thu, 11 Apr 2013 21:41:46 +0000 (23:41 +0200)]
backports: dissolve compat-2.6.25.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-3.10.h
Johannes Berg [Thu, 11 Apr 2013 19:08:47 +0000 (21:08 +0200)]
backports: dissolve compat-3.10.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: dissolve compat-3.9.h
Johannes Berg [Thu, 11 Apr 2013 18:48:09 +0000 (20:48 +0200)]
backports: dissolve compat-3.9.h

Move everything into the appropriate header files.

Also include uidgid.h into the new fs.h since kernels
that had uidgid.h include it already, so it doesn't
change anything there, but those that don't have it
obviously can't have included it and people rely on
it behing included there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: remove __inet_lookup_established
Johannes Berg [Thu, 11 Apr 2013 20:52:36 +0000 (22:52 +0200)]
backports: remove __inet_lookup_established

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: remove support for < 2.6.24
Johannes Berg [Thu, 11 Apr 2013 20:58:30 +0000 (22:58 +0200)]
backports: remove support for < 2.6.24

This hasn't been tested in years, and those kernels
aren't getting more interesting, so just remove the
support for them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: fix dma-buf backport patch
Johannes Berg [Fri, 12 Apr 2013 23:23:31 +0000 (01:23 +0200)]
backports: fix dma-buf backport patch

The patched backported dma-buf code uses the "current" macro
to determine task information, so it needs to include sched.h.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: move header files
Johannes Berg [Thu, 11 Apr 2013 14:55:22 +0000 (16:55 +0200)]
backports: move header files

This first step in reorganising the header files moves all the
header files into a new backport-include/ directory that gets
priority over the regular include/ where we copy the files we
want to backport from the kernel. This will help split all the
header files into logical units.

While at it, move and rename compat_2.6.h and compat_autoconf.h
to backport/backport.h and backport/autoconf.h respectively.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: patch tracing for older kernels
Johannes Berg [Fri, 12 Apr 2013 20:13:47 +0000 (22:13 +0200)]
backports: patch tracing for older kernels

For some reason the tracing on older kernels requires
the tracing to be declared before it's defined; it's
broken when the trace header is only included to create
the tracepoints.

Since new kernels don't, add patches for the two places
that rely on the new behaviour.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: fix includes in backport code
Johannes Berg [Fri, 12 Apr 2013 08:38:30 +0000 (10:38 +0200)]
backports: fix includes in backport code

A number of includes were missing in the backport(ed)
code since the command line includes almost everything.
As that's going to change, add missing includes to the
code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: average: backport efficiency improvements
Johannes Berg [Sat, 13 Apr 2013 22:00:16 +0000 (00:00 +0200)]
backports: average: backport efficiency improvements

This is what we get for not copying it directly :-)
For now, backport af556884359 manually.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agockmake: optionally fail on linker failures
Johannes Berg [Mon, 15 Apr 2013 09:16:47 +0000 (11:16 +0200)]
ckmake: optionally fail on linker failures

This will be enabled by default later, but right now it fails
on media/regulator drivers.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: disable media for 3.2, it fails
Johannes Berg [Mon, 15 Apr 2013 08:58:52 +0000 (10:58 +0200)]
backports: disable media for 3.2, it fails

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: add rndis_wlan usbnet requirements
Johannes Berg [Mon, 15 Apr 2013 08:25:38 +0000 (10:25 +0200)]
backports: add rndis_wlan usbnet requirements

Apparently I missed this during the conversion to the new
copy-list etc. The rndis_wlan driver requires some usbnet
and rndis code, if that's not present then it is either
not selectable or can be compiled but won't link against
older kernels that don't have the right requirements (or
don't have the symbols exported.)

For now, because the makefile parser is stupid, patch out
the asix driver objects because otherwise it's possible
to select it and fail the build. Improving the parser is
possible but I need to finish other things first.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: add intel_ips support
Luis R. Rodriguez [Sat, 13 Apr 2013 14:13:44 +0000 (07:13 -0700)]
backports: add intel_ips support

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

real    39m35.615s
user    1068m47.428s
sys     155m55.657s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: add media subsystem drivers
Luis R. Rodriguez [Sat, 13 Apr 2013 14:13:43 +0000 (07:13 -0700)]
backports: add media subsystem drivers

This adds backport support for all media subsystem
drivers. This is enabled only for >= 3.2. Some media
drivers rely on the new probe deferrral mechanism
(-EPROBE_DEFER see commit d1c3414c), those are only
enabled for kernels >= 3.4. Some media drivers only
depend on the regulatory but since we only support
backporting the regulatory on kernels >= 3.4 we only
enable those media drivers for >= 3.4.

This backports 433 media drivers.

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

real    39m35.615s
user    1068m47.428s
sys     155m55.657s

Cc: linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: add support for voltage / current regulator drivers
Luis R. Rodriguez [Sat, 13 Apr 2013 14:13:42 +0000 (07:13 -0700)]
backports: add support for voltage / current regulator drivers

This backports the latest regulator drivers for kernels >= 3.4.
We enable the regulator only on kernels >= 3.4 given that
it relies on the new probe deferral mechanism which would
otherwise mean having to support drivers that do not probe
correctly. Note that 3.2 had a base regulator implementation
but that was just stubs.

I did look into a way to upgrade the core kernel regulator
but given that it relies on late_initcall() and core_initcall()
we can't update this part of the kernel. I even looked at
using ksplice for this but it seems ksplice can't be used to
update init sections on the vmlinux ELF. I also haven't much
updates to these routines since 3.4 except for 86f5fcfc.

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

real    39m35.615s
user    1068m47.428s
sys     155m55.657s

Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agogentree.py: add support to explicitly disable a config
Luis R. Rodriguez [Sat, 13 Apr 2013 14:13:41 +0000 (07:13 -0700)]
gentree.py: add support to explicitly disable a config

At times we may want to disable a config option completely.
Add support for this. All you have to is list the config
on the depdependencies file with DISABLE instead of a kernel
version.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocompat: backport IORESOURCE_REG definition
Luis R. Rodriguez [Sat, 13 Apr 2013 14:13:40 +0000 (07:13 -0700)]
compat: backport IORESOURCE_REG definition

This was added to help regmap drivers avoid having
to use some non memory mapped equivalent, IORESOURCE_IO,
to help avoid confusion. This is simply carried over.

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains 72dcb119
v3.7-rc1~112^2~84

commit 72dcb1197228b50bfb709ba97c2d53013c605868
Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
Date:   Tue Aug 7 19:42:45 2012 +0100

    resources: Add register address resource type

    Currently a bunch of I2C/SPI MFD drivers are using IORESOURCE_IO for
    register address ranges. Since this causes some confusion due to the
    primary use of this resource type for PCI/ISA I/O ports create a new
    resource type IORESOURCE_REG.

    Unfortunately the current resource types are specified as bitmasks and
    there are no free bitmasks even though they really shouldn't be used as
    such so we define the new type as IORESOURCE_IO | IORESOURCE_MEM.
    Benjamin Herrenschmidt and Russell King have both verified that none of
    the users in this series will have a problem with this, and no new code
    should be affected.

    This patch was written by Russell King but he found himself unable to
    take the patch further.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Tested-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocompat: add missing header includes for DMA backports
Luis R. Rodriguez [Sat, 13 Apr 2013 14:13:39 +0000 (07:13 -0700)]
compat: add missing header includes for DMA backports

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: add support for backport_srctree
Luis R. Rodriguez [Sat, 13 Apr 2013 14:13:38 +0000 (07:13 -0700)]
backports: add support for backport_srctree

The Linux kernel uses srctree to help prefix header files
and scripts. When backporting we want to be able to override
driver's Makefiles' usage of srctree with our own. Since we
can't easily and sanely override the srctree itself without
causing a lot of issues just use the python generator to
do the change for us on the target Makefiles. This addresses
the srctree usage case and where ccflags was used without
prefixing any parent directory when used with drivers, the
kernel tends to fix that with addtree command.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
[also remove now unnecessary patches]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: add update-initramfs support
Luis R. Rodriguez [Wed, 10 Apr 2013 11:35:28 +0000 (04:35 -0700)]
backports: add update-initramfs support

You'll need to update your initramfs for for a few modules.
This is very distribution specific.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
[fix script argument]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: use depmod -a
Luis R. Rodriguez [Wed, 10 Apr 2013 11:35:27 +0000 (04:35 -0700)]
backports: use depmod -a

Use only depmod -a and at the same time tell the
user to reboot, we no longer support unloading /
loading for them given that we backport too many
modules.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: add udev rules if required for backported firmware_class
Luis R. Rodriguez [Wed, 10 Apr 2013 11:35:26 +0000 (04:35 -0700)]
backports: add udev rules if required for backported firmware_class

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: add check_depmod to look for module search path
Luis R. Rodriguez [Wed, 10 Apr 2013 11:35:25 +0000 (04:35 -0700)]
backports: add check_depmod to look for module search path

This backports project relies on you being able to update
your Linux distribution modules by looking at an updates
search path, if one is not found we update depmod to look
for the new path for you.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: add support for module compression
Luis R. Rodriguez [Wed, 10 Apr 2013 11:35:24 +0000 (04:35 -0700)]
backports: add support for module compression

Some Linux distributions like to compress their modules.
Add support to detect this in a modutils / modprobe agnostic
way.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
[refactor to just a single script]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: add blacklist module support
Luis R. Rodriguez [Wed, 10 Apr 2013 20:00:26 +0000 (13:00 -0700)]
backports: add blacklist module support

This lets us provide a simple map of new drivers and old
drivers that it replaces at install time. This generates
a blacklist via the file:

/etc/modprobe.d/backports.conf

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocompat: backport dma_get_sgtable()
Luis R. Rodriguez [Wed, 10 Apr 2013 11:35:22 +0000 (04:35 -0700)]
compat: backport dma_get_sgtable()

No architectures yet have their own dma_map_sg ops so we just
use the commonly developed one for all archs in this
implementation. We enable this only for 3.2 given that
this is only needed for dma-buf ops implementations and
we only port that down to 3.2 so far as well.

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains d2b7428e
v3.6-rc1~57^2~3

commit d2b7428eb0caa7c66e34b6ac869a43915b294123
Author: Marek Szyprowski <m.szyprowski@samsung.com>
Date:   Wed Jun 13 10:05:52 2012 +0200

    common: dma-mapping: introduce dma_get_sgtable() function

    This patch adds dma_get_sgtable() function which is required to let
    drivers to share the buffers allocated by DMA-mapping subsystem. Right
    now the driver gets a dma address of the allocated buffer and the kernel
    virtual mapping for it. If it wants to share it with other device (= map
    into its dma address space) it usually hacks around kernel virtual
    addresses to get pointers to pages or assumes that both devices share
    the DMA address space. Both solutions are just hacks for the special
    cases, which should be avoided in the final version of buffer sharing.

    To solve this issue in a generic way, a new call to DMA mapping has been
    introduced - dma_get_sgtable(). It allocates a scatter-list which
    describes the allocated buffer and lets the driver(s) to use it with
    other device(s) by calling dma_map_sg() on it.

    This patch provides a generic implementation based on virt_to_page()
    call. Architectures which require more sophisticated translation might
    provide their own get_sgtable() methods.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
ckmake (only for compat)

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

real    2m39.638s
user    24m55.205s
sys     12m59.349s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocompat: add helpers to aid backport of generic DMA changes for v4l
Luis R. Rodriguez [Wed, 10 Apr 2013 11:35:21 +0000 (04:35 -0700)]
compat: add helpers to aid backport of generic DMA changes for v4l

Commit c60520fa needs to be reverted for older kernels because
although we can backport some large changes to DMA that
ended up extending some core dma data structures, for
details see bca0fa5f as an example. To *aid* with the driver
changes required add a helper that lets us call what we used
to do, thus requiring a smaller delta on the upstream code.

We're only adding this for >= 3.2 as this is required only
for media which are also only supporting on >= 3.2.

commit c60520fa50cd86d64bc8ebb34300ddc4ca91393d
Author: Marek Szyprowski <m.szyprowski@samsung.com>
Date:   Thu Jun 14 11:32:21 2012 -0300

    [media] v4l: vb2-dma-contig: let mmap method to use dma_mmap_coherent call

    Let mmap method to use dma_mmap_coherent call.  Moreover, this patch removes
    vb2_mmap_pfn_range from videobuf2 helpers as it was suggested by Laurent
    Pinchart.  The function is no longer used in vb2 code.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocompat: backport module_platform_driver_probe()
Luis R. Rodriguez [Wed, 10 Apr 2013 11:35:20 +0000 (04:35 -0700)]
compat: backport module_platform_driver_probe()

This is just a helper.

commit bab734fcdf2c690371e6749ce484b17653b3cb0e
Author: Fabio Porcedda <fabio.porcedda@gmail.com>
Date:   Wed Jan 9 12:15:26 2013 +0100

    driver core: add helper macro for platform_driver_probe() boilerplate

    For simple modules that contain a single platform_driver without any
    additional setup code then ends up being a block of duplicated
    boilerplate.  This patch adds a new macro,
    module_platform_driver_probe(), which replaces the
    module_init()/module_exit() registrations with template functions.

    This macro use the same idea of module_platform_driver().

    This macro is useful to stop the misuse of module_platform_driver() for
    removing the platform_driver_probe() boilerplate.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains bab734fc
v3.9-rc1~128^2~123

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocompat: backport devm_ioremap_resource()
Luis R. Rodriguez [Wed, 10 Apr 2013 11:35:19 +0000 (04:35 -0700)]
compat: backport devm_ioremap_resource()

The new API gives more information to driver users but
the older kernels do not have any of these mechanisms
in place so just throw out ERR_PTR(-ENOMEM) in case
of failure.

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains 75096579
v3.9-rc1~128^2~63

commit 75096579c3ac39ddc2f8b0d9a8924eba31f4d920
Author: Thierry Reding <thierry.reding@avionic-design.de>
Date:   Mon Jan 21 11:08:54 2013 +0100

    lib: devres: Introduce devm_ioremap_resource()

    The devm_request_and_ioremap() function is very useful and helps avoid a
    whole lot of boilerplate. However, one issue that keeps popping up is
    its lack of a specific error code to determine which of the steps that
    it performs failed. Furthermore, while the function gives an example and
    suggests what error code to return on failure, a wide variety of error
    codes are used throughout the tree.

    In an attempt to fix these problems, this patch adds a new function that
    drivers can transition to. The devm_ioremap_resource() returns a pointer
    to the remapped I/O memory on success or an ERR_PTR() encoded error code
    on failure. Callers can check for failure using IS_ERR() and determine
    its cause by extracting the error code using PTR_ERR().

    devm_request_and_ioremap() is implemented as a wrapper around the new
    API and return NULL on failure as before. This ensures that backwards
    compatibility is maintained until all users have been converted to the
    new API, at which point the old devm_request_and_ioremap() function
    should be removed.

    A semantic patch is included which can be used to convert from the old
    devm_request_and_ioremap() API to the new devm_ioremap_resource() API.
    Some non-trivial cases may require manual intervention, though.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocompat: backport dev_get_regmap()
Luis R. Rodriguez [Wed, 10 Apr 2013 11:35:18 +0000 (04:35 -0700)]
compat: backport dev_get_regmap()

We can't backport dev_get_regmap() unless we backport regmap
fully onto compat, but users typically try to get the regmap in
other ways first:

        if (config->regmap)
                rdev->regmap = config->regmap;
        else if (dev_get_regmap(dev, NULL))
                rdev->regmap = dev_get_regmap(dev, NULL);
        else if (dev->parent)
                rdev->regmap = dev_get_regmap(dev->parent, NULL);

So this would option would just not be available for.

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains 72b39f6f
v3.5-rc1~117^2~7^3

commit 72b39f6f2b5a6b0beff14b80bed9756f151218a9
Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
Date:   Tue May 8 17:44:40 2012 +0100

    regmap: Implement dev_get_regmap()

    Use devres to implement dev_get_regmap(). This should mean that in almost
    all cases devices wishing to take advantage of framework features based on
    regmap shouldn't need to explicitly pass the regmap into the framework.
    This simplifies device setup a bit.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocompat: backport devres_release()
Luis R. Rodriguez [Wed, 10 Apr 2013 11:35:17 +0000 (04:35 -0700)]
compat: backport devres_release()

commit d926d0e4c74cfcb42a05e91d1cdf698b41e1e118
Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
Date:   Thu May 3 18:15:13 2012 +0100

    devres: Add devres_release()

    APIs using devres frequently want to implement a "remove and free the
    resource" operation so it seems sensible that they should be able to
    just have devres do the freeing for them since that's a big part of what
    devres is all about.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocompat: backport devm_regmap_init()
Luis R. Rodriguez [Wed, 10 Apr 2013 11:35:14 +0000 (04:35 -0700)]
compat: backport devm_regmap_init()

Backport devm_regmap_init() for I2C and SPI.
Asynchronous I/O support was added as of 3.9 and
since the regmap is part the core we don't want
to deal with trying a full backport replacement
yet. Given that no one as of next-20130328 uses
regmap asynchronous we simply warn if its ever
used for now. The regmap callbacks were made
bus agnostic as of commit 0135bbcc added on on
3.5 and becuase of this we we just remove all
that from our port given that we do this port
for kernels < 3.4.

This works with the old core regmap implementation
added as of 3.1 given that static inlines were
used as wrapper for calls and the bus context
was only used by the internal code.

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains c0eb4676
v3.4-rc1~126^2~4^2

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains 0d509f2b
v3.9-rc2~19^2~6^2~5

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains 0135bbcc
v3.5-rc1~117^2~7^3~6

commit c0eb46766d395da8d62148bda2e59bad5e6ee2f2
Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
Date:   Mon Jan 30 19:56:52 2012 +0000

    regmap: Implement managed regmap_init()

    Save error handling and unwinding code in drivers by providing managed
    versions of the regmap init functions, simplifying usage.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
commit 0d509f2b112b21411712f0bf789b372987967e49
Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
Date:   Sun Jan 27 22:07:38 2013 +0800

    regmap: Add asynchronous I/O support

    Some use cases like firmware download can transfer a lot of data in quick
    succession. With high speed buses these use cases can benefit from having
    multiple transfers scheduled at once since this allows the bus to minimise
    the delay between transfers.

    Support this by adding regmap_raw_write_async(), allowing raw transfers to
    be scheduled, and regmap_async_complete() to wait for them to finish.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
commit 0135bbcc7a0cc056f0203ff839466236b8e3dc19
Author: Stephen Warren <swarren@nvidia.com>
Date:   Wed Apr 4 15:48:30 2012 -0600

    regmap: introduce explicit bus_context for bus callbacks

    The only context needed by I2C and SPI bus definitions is the device
    itself; this can be converted to an i2c_client or spi_device in order
    to perform IO on the device. However, other bus types may need more
    context in order to perform IO. Enable this by having regmap_init accept
    a bus_context parameter, and pass this to all bus callbacks. The
    existing callbacks simply pass the struct device here. Future bus types
    may pass something else.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocompat: backport __i2c_transfer()
Luis R. Rodriguez [Wed, 10 Apr 2013 11:35:13 +0000 (04:35 -0700)]
compat: backport __i2c_transfer()

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains b37d2a3a
v3.6-rc1~28^2~265

commit b37d2a3a75cb0e72e18c29336cb2095b63dabfc8
Author: Jean Delvare <khali@linux-fr.org>
Date:   Fri Jun 29 07:47:19 2012 -0300

    [media] i2c: Export an unlocked flavor of i2c_transfer

    Some drivers (in particular for TV cards) need exclusive access to
    their I2C buses for specific operations. Export an unlocked flavor
    of i2c_transfer to give them full control.

    The unlocked flavor has the following limitations:
    * Obviously, caller must hold the i2c adapter lock.
    * No debug messages are logged. We don't want to log messages while
      holding a rt_mutex.
    * No check is done on the existence of adap->algo->master_xfer. It
      is thus the caller's responsibility to ensure that the function is
      OK to call.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocompat: backport dev_level_ratelimited()
Luis R. Rodriguez [Wed, 10 Apr 2013 11:35:12 +0000 (04:35 -0700)]
compat: backport dev_level_ratelimited()

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains 6ca04593
v3.5-rc1~147^2~7

This is only enabled for kernels where ratelimit.h was added.

commit 6ca045930338485a8cdef117e74372aa1678009d
Author: Hiroshi DOYU <hdoyu@nvidia.com>
Date:   Mon May 14 10:47:57 2012 +0300

    driver core: Add dev_*_ratelimited() family

    Add dev_*_ratelimited() family, dev_* version of pr_*_ratelimited().

    Using Joe Perches's proposal/implementation.

Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: enable DRM_NOUVEAU for 3.2
Luis R. Rodriguez [Wed, 10 Apr 2013 11:35:11 +0000 (04:35 -0700)]
backports: enable DRM_NOUVEAU for 3.2

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: include <linux/module.h> to fix module version
Johannes Berg [Wed, 10 Apr 2013 10:17:05 +0000 (12:17 +0200)]
backports: include <linux/module.h> to fix module version

Otherwise we may end up with MODULE_VERSION() not being
defined, and then compile obviously fails.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agobackports: fix module version
Johannes Berg [Tue, 9 Apr 2013 22:00:17 +0000 (00:00 +0200)]
backports: fix module version

Adding multiple MODULE_VERSION statements doesn't work on
kernels before 3.8 (where __UNIQUE_ID was introduced) so
just use a single line:

$ /sbin/modinfo .../net/mac80211/mac80211.ko
filename:       .../net/mac80211/mac80211.ko
license:        GPL
description:    IEEE 802.11 subsystem
version:        backported from Linux (next-20130405-0-g7df052b) using backports 6648f05
srcversion:     CD64527389072C2F603DD61
depends:        cfg80211,compat
vermagic:       3.8.0 SMP mod_unload modversions
parm:           max_nullfunc_tries:Maximum nullfunc tx tries before disconnecting (reason 4). (int)
parm:           max_probe_tries:Maximum probe tries before disconnecting (reason 4). (int)
parm:           probe_wait_ms:Maximum time(ms) to wait for probe response before disconnecting (reason 4). (int)
parm:           ieee80211_default_rc_algo:Default rate control algorithm for mac80211 to use (charp)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>