ext4: optimize test_root()

The test_root() function could potentially loop forever due to
overflow issues.  So rewrite test_root() to avoid this issue; as a
bonus, it is 38% faster when benchmarked via a test loop:

int main(int argc, char **argv)
{
	int  i;

	for (i = 0; i < 1 << 24; i++) {
		if (test_root(i, 7))
			printf("%d\n", i);
	}
}

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
gcc 4.8 compatibility fix
IO: removed usless test & debug things

Conflicts:
	block/Makefile
Not cool to force that debugging.
Update Install Script
Linux 3.4.90
leds: leds-gpio-flash: add led gpio flash driver

the flash led pins flash_en and flash_now are connected with msm gpios.
add led gpio flash driver for qrd board.

Signed-off-by: Tingting Yang <tingting@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: leds-qpnp: Support vin control for MPP LEDs

MPP can support input voltages from vin0 to vin3. Parse
this data from Device Tree and program appropriate MPP
registers. Also add support for minimum brightness that
MPP LED can support.

Signed-off-by: Chun Zhang <chunz@codeaurora.org>
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: leds-qpnp: Add LUT support for KPDBL

Keypad Backlight module supports LUT mode. Add
support for LUT mode and parse the parameters
from DTS file.

Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: leds-qpnp: Add brightness control for mpp leds

Add brightness control by changing the current supplied
to leds in manual mode.

Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: leds-qpnp: fix WLED max current mask

Change WLED_MAX_CURR_MASK to 0x1F as max current value in
LED1_FULL_SCALE_CURRENT register occupies 5 bits

Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: leds-qpnp: Set proper flash duration

Flash duration is between 0ms and 1280ms in increments of 10ms and can
be stored in an 8-bit value. The current conversion formula to u8
results in shrinking of this value, which leads to a loss of
most-significant bit in flash duration. This erroneous calcuation
is corrected in the driver.

Signed-off-by: Abinaya P <abinayap@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: leds-qpnp: Set the strobe bit correctly for flash led

The strobe bit is set to 1 when the flash led uses HW strobe and it is
set to 0 when the flash led uses SW strobe.

Signed-off-by: Abinaya P <abinayap@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: leds-qpnp: Correct switch frequency settings

New hardware has different settings than old hardware, which
is no longer supported.  Update settings as needed.

Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: Use devm_kzalloc in leds-gpio.c file

devm_kzalloc() makes cleanup simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: leds-gpio: use of_match_ptr()

Instead of having to define the match table to NULL if CONFIG_OF isn't
set, use the of_match_ptr() macro which will do this for us.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: leds-gpio: Use platform_{get,set}_drvdata

Use the wrapper functions, so we can directly pass a struct
platfrom_device.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: simple_strtoul() cleanup

led-class.c and ledtrig-timer.c still use simple_strtoul().  Change them
to use kstrtoul() instead of obsolete simple_strtoul().

Also fix the existing int ret declaration to be ssize_t to match the
return type for _store functions in ledtrig-timer.c.

[neo: Preserve previous commit as well.]

Signed-off-by: Shuah Khan <shuahkhan@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
leds: fixed a coding style issue.

Fixed a coding style issue relating to trailing
white space error found by checkpatch.pl tool in drivers/leds/led-class.c

Signed-off-by: Jeffrin Jose <ahiliation@yahoo.co.in>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
[s2w/dt2w pwrkey suspend]: Make it more robust

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>