compat: Drop glibc 2.14 warning

This is not the case anymore as we rebuild the binaries.

Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: remove autoconf inclusion on compat-2.6.33.c

The inclusion of the appropriate kernel for autoconf
varies depending on the Linux kernel version used.

This magic is already dealt for us on compat-2.6.h and
since all files include that we don't need to be including
this header file.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: fix no_printk() definition

The definition was supposed to define compat_no_prinkt()
given that RHEL already defines no_printk().

Reported-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: backport mod_delayed_work() usage instead of cancel + queue

The patch below is backported by using cancel_delayed_work()
followed by mod_delayed_work(). mod_delayed_work() will be
introduced on v3.7, so we add this backport onto the 3.7
backport files.

The commit that inroduced mod_delayed_work():

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 8376fe22
next-20120809~16^2~2

The reason we are backporting this:

commit 7adf612cacb5d49778201eb06cc54281570eeb21
Author: Tejun Heo <tj@kernel.org>
Date:   Fri Aug 3 10:30:47 2012 -0700

    workqueue: use mod_delayed_work() instead of cancel + queue

    Convert delayed_work users doing cancel_delayed_work() followed by
    queue_delayed_work() to mod_delayed_work().

    Most conversions are straight-forward.  Ones worth mentioning are,

    * drivers/edac/edac_mc.c: edac_mc_workq_setup() converted to always
      use mod_delayed_work() and cancel loop in
      edac_mc_reset_delay_period() is dropped.

    * drivers/platform/x86/thinkpad_acpi.c: No need to remember whether
      watchdog is active or not.  @fan_watchdog_active and related code
      dropped.

    * drivers/power/charger-manager.c: Seemingly a lot of
      delayed_work_pending() abuse going on here.
      [delayed_]work_pending() are unsynchronized and racy when used like
      this.  I converted one instance in fullbatt_handler().  Please
      conver the rest so that it invokes workqueue APIs for the intended
      target state rather than trying to game work item pending state
      transitions.  e.g. if timer should be modified - call
      mod_delayed_work(), canceled - call cancel_delayed_work[_sync]().

    * drivers/thermal/thermal_sys.c: thermal_zone_device_set_polling()
      simplified.  Note that round_jiffies() calls in this function are
      meaningless.  round_jiffies() work on absolute jiffies not delta
      delay used by delayed_work.

    v2: Tomi pointed out that __cancel_delayed_work() users can't be
        safely converted to mod_delayed_work().  They could be calling it
        from irq context and if that happens while delayed_work_timer_fn()
        is running, it could deadlock.  __cancel_delayed_work() users are
        dropped.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
    Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
    Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
    Cc: Jens Axboe <axboe@kernel.dk>
    Cc: Jiri Kosina <jkosina@suse.cz>
    Cc: Doug Thompson <dougthompson@xmission.com>
    Cc: David Airlie <airlied@linux.ie>
    Cc: Roland Dreier <roland@kernel.org>
    Cc: "John W. Linville" <linville@tuxdriver.com>
    Cc: Zhang Rui <rui.zhang@intel.com>
    Cc: Len Brown <len.brown@intel.com>
    Cc: David Howells <dhowells@redhat.com>
    Cc: "J. Bruce Fields" <bfields@fieldses.org>
    Cc: Johannes Berg <johannes@sipsolutions.net>

mcgrof@garbanzo ~/compat (git::master)$ gcc --version
gcc (Debian 4.7.1-2) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mcgrof@garbanzo ~/compat (git::master)$ ckmake
Trying kernel 3.5.0-030500-generic [OK]
Trying kernel 3.4.4-030404-generic [OK]
Trying kernel 3.3.7-030307-generic [OK]
Trying kernel 3.2.2-030202-generic [OK]
Trying kernel 3.1.10-030110-generic [OK]
Trying kernel 3.0.18-030018-generic [OK]
Trying kernel 2.6.39-02063904-generic [OK]
Trying kernel 2.6.38-02063808-generic [OK]
Trying kernel 2.6.37-02063706-generic [OK]
Trying kernel 2.6.36-02063604-generic [OK]
Trying kernel 2.6.35-02063512-generic [OK]
Trying kernel 2.6.34-02063410-generic [OK]
Trying kernel 2.6.33-02063305-generic [OK]
Trying kernel 2.6.32-02063255-generic [OK]
Trying kernel 2.6.31-02063113-generic [OK]
Trying kernel 2.6.30-02063010-generic [OK]
Trying kernel 2.6.29-02062906-generic [OK]
Trying kernel 2.6.28-02062810-generic [OK]
Trying kernel 2.6.27-020627-generic [OK]
Trying kernel 2.6.26-020626-generic [OK]
Trying kernel 2.6.25-020625-generic [OK]
Trying kernel 2.6.24-020624-generic [OK]

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: fixup error in no_printk definition

What initially looked like a valid definition for the #define for
no_printk was not.  This corrects the problem and the change that was
thought to correct it.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: fix SIMPLE_DEV_PM_OPS() on kernel 2.6.29

This patch reworks this commit:
commit 8e661d67b1965afcfd9d3672803e2fc37765f6ef
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Thu Aug 2 22:15:05 2012 +0200

    compat: handle pci suspend/resume on kernel 2.6.29

The functions for pci suspend and resume are now created by
compat_pci_suspend and compat_pci_resume and then used by
SIMPLE_DEV_PM_OPS. This way attributes like static, const and so on are
forwarded in the struct dev_pm_ops define on all kernel versions.

In addition this patch adds an own SIMPLE_DEV_PM_OPS() for kernel
2.6.32 overwriting the original, because in kernel 2.6.32 const is
needed for struct dev_pm_ops in pci drivers.

This is based on work done by Johannes Berg.

CC: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: generate CONFIG_COMPAT_KERNEL_3_7

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: fix mod_delayed_work

 * Add return value to function
 * make EXPORT_SYMBOL_GPL work by including the needed header file

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: move RHEL mask for qdisc_cb_private_validate

Move the mask for qdisc_cb_private_validate directly in front of the
function to it is only included when this function is really used from
compat.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: add tty_{un}lock() for kernel < 3.7

The change of tty_{un}lock() in kernel 3.5 was reverted, but now it was
added again for kernel 3.7.

This patch does the needed changes to backport this commit:
commit 89c8d91e31f267703e365593f6bfebb9f6d2ad01
Author: Alan Cox <alan@linux.intel.com>
Date:   Wed Aug 8 16:30:13 2012 +0100

    tty: localise the lock

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: Drop redundant udev rules file

udev rules for Ubuntu and the-rest-of-world are the same. Drop one of
them and use the other one.

Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: Backport __wake_up_all_locked()

This backports:

commit 63b2001169e75cd71e917ec953fdab572e3f944a
Author: Thomas Gleixner <tglx@linutronix.de>
Date:   Thu Dec 1 00:04:00 2011 +0100

	sched/wait: Add __wake_up_all_locked() API

$ git describe --contains 63b2001169e75cd71e917ec953fdab572e3f944a
v3.4-rc1~3^2~24

This is used by the 3.6-rcX radeon DRM driver (radeon_sa.c) and will
probably be used by other drivers in the near future.

__wake_up_all_locked() is a preprocessor macro around __wake_up_locked()
which gained a 3rd parameter in 3.4.

That's why I backported the new __wake_up_locked() as
compat_wake_up_locked() to avoid name conflicts.

This new function uses the internal __wake_up_common() function
which needed a backport too. I backported it as
compat_wake_up_common() as __wake_up_common() was made available
in kernels between 2.6.28 <= x <= 2.6.30 through wait.h and
dropped after 2.6.30. Renaming fixes build problems of compat
for those kernels.

Trying kernel 3.5.0-030500-generic [OK]
Trying kernel 3.4.4-030404-generic [OK]
Trying kernel 3.3.7-030307-generic [OK]
Trying kernel 3.2.2-030202-generic [OK]
Trying kernel 3.1.10-030110-generic [OK]
Trying kernel 3.0.18-030018-generic [OK]
Trying kernel 2.6.39-02063904-generic [OK]
Trying kernel 2.6.38-02063808-generic [OK]
Trying kernel 2.6.37-02063706-generic [OK]
Trying kernel 2.6.36-02063604-generic [OK]
Trying kernel 2.6.35-02063512-generic [OK]
Trying kernel 2.6.34-02063410-generic [OK]
Trying kernel 2.6.33-02063305-generic [OK]
Trying kernel 2.6.32-02063255-generic [OK]
Trying kernel 2.6.31-02063113-generic [OK]
Trying kernel 2.6.30-02063010-generic [OK]
Trying kernel 2.6.29-02062906-generic [OK]
Trying kernel 2.6.28-02062810-generic [OK]
Trying kernel 2.6.27-020627-generic [OK]
Trying kernel 2.6.26-020626-generic [OK]
Trying kernel 2.6.25-020625-generic [OK]
Trying kernel 2.6.24-020624-generic [OK]

Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: rename compat-wireless to compat-drivers

The git tree name has changed. New documentation:

https://backports.wiki.kernel.org

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: RHEL build script fixup from upstream

There are parentheses where there should be curly braces.  This is a
patch that Phillip Perry posted to the list, but it was never
integrated.

Signed-off-by: Philip J Perry <phil@elrepo.org>
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: fix defines for RHEL by adding RHEL to string

The .config file contains 'CONFIG_COMPAT_6_1,' when it should contain,
'CONFIG_COMPAT_RHEL_6_1.'  This fixes that by adding the 'RHEL' in the
proper spot.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: disable KFIFO on RHEL6.1 and later

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: disable compat firmware module on RHEL6.0 and later

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: fixup firmware defines on RHEL6

Commit 182630e0f686a569aaf9b34781b08f27dc0ab1bb changed the way the
firmware code was handled to create new definitions based on config
options, not based on whether or not CONFIG_COMPAT_FIRMWARE_CLASS
was set.  Both need to be included to make this work properly in
environments like RHEL6 that do not need CONFIG_COMPAT_FIRMWARE_CLASS to
be set, but have CONFIG_FW_LOADER or CONFIG_FW_LOADER_MODULE set.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
compat: add tty_port_register_device

tty_register_device was replaced by tty_port_register_device in this
commit:
commit 734cc1783816ae358cef45673a29bf7af974e147
Author: Jiri Slaby <jslaby@suse.cz>
Date:   Tue Aug 7 21:47:47 2012 +0200

    TTY: use tty_port_register_device

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Merge branch 'master' of git://github.com/mcgrof/compat