Linux 3.0.39
Revert "small oc rework"

This reverts commit 8ba2466a11fd135b65933d94beeaa3706d1addd0.
Revert "cpufreq: Add cpu utilization statistics to aid decisions made by user"

This reverts commit 97cef8a4f19ba6768d518415647ba75f06245d1c.

Conflicts:
	drivers/cpufreq/cpufreq_badass.c
Linux 3.0.40
msm: pm-8x60: Check for SPM status in msm_pm_verify_cpu_pc

Verify that SPM is in sleep mode in msm_pm_verify_cpu_pc. If not, it is
possible that msm_pm_wait_cpu_shutdown could fail but acpuclock would
turn off the clocks based on the the return value of
msm_pm_verify_cpu_pc.

CRs-fixed: 376791

Change-Id: Id55019508ea9bc27106eb298e19988aecc055cac
thermal: There may be an outstanding task to check for threshold crossing
when msm_thermal is disabled and CPU is restored to maximum
frequency. This task can get scheduled after the maximum frequency
is restored, and result in another mitigation that pins CPU
frequencies to 918mHz. This happens in the case that the final
temperature was still above the max temperature threshold.
This patch ensures any outstanding tasks are cancelled and flushed
before finally restoring the CPU frequencies.

CRs-fixed: 351614
Change-Id: Ifce00b379989b78856803ac09c7403207f5c998b
Signed-off-by: Eugene Seah <eseah@codeaurora.org>
cpu_ondemand: When a new sampling rate is shorter than the current one, (e.g., 1 sec
--> 10 ms) regardless how short the new one is, the current ondemand
mechanism wait for the previously set timer to be expired.

For example, if the user has just expressed that the sampling rate
should be 10 ms from now and the previous was 1000 ms, the new rate may
become effective 999 ms later, which could be not acceptable for the
user if the user has intended to speed up sampling because the system is
expected to react to CPU load fluctuation quickly from __now__.

In order to address this issue, we need to cancel the previously set
timer (schedule_delayed_work) and reset the timer if resetting timer is
expected to trigger the delayed_work ealier.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
sched: While investigating why the load-balancer did funny I found that the
rq->cpu_load[] tables were completely screwy.. a bit more digging
revealed that the updates that got through were missing ticks followed
by a catchup of 2 ticks.

The catchup assumes the cpu was idle during that time (since only nohz
can cause missed ticks and the machine is idle etc..) this means that
esp. the higher indices were significantly lower than they ought to
be.

The reason for this is that its not correct to compare against jiffies
on every jiffy on any other cpu than the cpu that updates jiffies.

This patch cludges around it by only doing the catch-up stuff from
nohz_idle_balance() and doing the regular stuff unconditionally from
the tick.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: pjt@google.com
Cc: Venkatesh Pallipadi <venki@google.com>
Link: http://lkml.kernel.org/n/tip-tp4kj18xdd5aj4vvj0qg55s2@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
modified for Linux 3.0 from Linux 3.4+ by faux123
block/deadline: tweaked for better performance on android
cpufreq/ondemand: add early suspend drivers to adjust cpu sampling rates

screen off: 6 * min sampling rate to reduce power consumption
screen on: normal sampling rate set by init

faux123
cpufreq/badass: add early suspend drivers to adjust cpu sampling rates

screen off: 6 * min sampling rate to reduce power consumption
screen on: normal sampling rate set by init
USB OTG:USB Audio and HID

The control request will be used by the host to enable/disable USB audio
and the ioctl will be used by userspace to read the audio mode

Signed-off-by: Mike Lockwood <lockwood@google.com>

USB: gadget: f_accessory: Add support for HID input devices

Signed-off-by: Mike Lockwood <lockwood@google.com>

USB: gadget: f_audio_source: New gadget driver for audio output

This driver presents a standard USB audio class interface to the host
and an ALSA PCM device to userspace

Signed-off-by: Mike Lockwood <lockwood@google.com>

usb: gadget: composite: Fix corruption when changing configuration

Remove the config from the configs list before releasing the spinlock.
Otherwise the other cpu might be processing a SET_CONFIGURATION that
will switch to the configuration that is being released.

Bug: 6521576
Change-Id: Id4da0d0e18ead63e20cb236cd1d3e8e6d116acce
Signed-off-by: Benoit Goby <benoit@android.com>usb: gadget: composite: Fix corruption when changing configuration
Remove the config from the configs list before releasing the spinlock.
Otherwise the other cpu might be processing a SET_CONFIGURATION that
will switch to the configuration that is being released.

Bug: 6521576
Change-Id: Id4da0d0e18ead63e20cb236cd1d3e8e6d116acce
Signed-off-by: Benoit Goby <benoit@android.com>

USB: gadget: f_audio_source: Adjust packet timing to reduce glitches

Increase max packet size and clean up timing logic so we can better
recover from not getting an interrupt in time for a SOF.

Signed-off-by: Mike Lockwood <lockwood@google.com>

USB: gadget: f_audio_source: Fix error handling and increase packet size

Fixes watchdog reset on USB disconnect
Larger packet size fixes performance in fullspeed mode

Signed-off-by: Mike Lockwood <lockwood@google.com>
fix compiler warnings

fs/fat/dir.c:43: warning: 'de' may be used uninitialized in this function

The complexity of the code flow makes this seem possible.  Initialize the value to NULL to eliminate the compiler warning.  This only masks the warning, since if the value were unused, there would still be a
NULL pointer.

Change-Id: I9fc36abace09409853b63e0997328b75ce703769

Signed-off-by: David Brown <davidb@codeaurora.org>

netfilter: xt_log.h: fix warning: value computed is not used
gitignore cleanup