block: urgent: Fix dispatching of URGENT mechanism

There are cases when blk_peek_request is called not from blk_fetch_request
thus the URGENT request may be started but the flag q->dispatched_urgent is
not updated.

Change-Id: I4fb588823f1b2949160cbd3907f4729767932e12
CRs-fixed: 471736
CRs-fixed: 473036
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
leds: Add LED trigger for thermal sensor

Add a thermal trigger named 'thermal' which activated by thermal
sensor.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
mach-msm: mako: Use default triggers for RGB LED

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
leds: Do not remove trigger when brightness = LED_OFF

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
leds: Switch off LED when thermal trigger deactivated

Also initialize properly driver.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
power: pm8921-charger: Don't pollute kmsg when baterry < 10%

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
power: pm8921: Change info message to debug

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
staging: prima: Replace wpalTrace with WPAL_TRACE

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
staging: prima: Disable debug

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
staging: prima: Supress more trace messages

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
sched: LOAD_FREQ (4*HZ+61) avoids loadavg Moire.

From http://ripke.com/loadavg/moire

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
cpufreq: stats: Don't stop notification call chain

The notification call chain is stopped if error returned. Since
no further steps is needed to handle such error, let's just print
a debug message here so the other registered cpufreq notifier can
be called correctly.

Signed-off-by: Lianwei Wang <a22439@motorola.com>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
ledtrig/msm_thermal: add get_threshold()

Add get_threshold() for the ledtrig-thermal to determine whats the
lowest value to check the temp from. Also fetch temp from the
correct sensor.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
block: account iowait time when waiting for completion of IO request

Using wait_for_completion() for waiting for a IO request to be executed
results in wrong iowait time accounting. For example, a system having
the only task doing write() and fdatasync() on a block device can be
reported being idle instead of iowaiting as it should because
blkdev_issue_flush() calls wait_for_completion() which in turn calls
schedule() that does not increment the iowait proc counter and thus does
not turn on iowait time accounting.

The patch makes block layer use wait_for_completion_io() instead of
wait_for_completion() where appropriate to account iowait time
correctly.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>
sched: add wait_for_completion_io[_timeout]

The only difference between wait_for_completion[_timeout]() and
wait_for_completion_io[_timeout]() is that the latter calls
io_schedule_timeout() instead of schedule_timeout() so that the caller
is accounted as waiting for IO, not just sleeping.

These functions can be used for correct iowait time accounting when the
completion struct is actually used for waiting for IO (e.g. completion
of a bio request in the block layer).

Modified to compile with 3.4.0 on the Nexus 4 (Mako)

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Derek Cannata <thederekjay@gmail.com>