CHROMIUM: BACKPORT: regulator: s5m8767: fix stack corruption.
authorTodd Broch <tbroch@chromium.org>
Tue, 12 Feb 2013 21:27:01 +0000 (13:27 -0800)
committerChromeBot <chrome-bot@google.com>
Tue, 12 Feb 2013 22:52:59 +0000 (14:52 -0800)
commit5ec36aee7fcc37ca9d535b6b7a60675175737f0b
treee7acb081fafa7913ee79b079cc5b06cb505bb547
parent98957591406f17058f8bada014252f9328fc9fb0
CHROMIUM: BACKPORT: regulator: s5m8767: fix stack corruption.

This CL fixes same stack corruption identified by the following commit

     commit 3ef303988cfcb35922f550892cf476e861377f0b
     Author: Inderpal Singh <inderpal.singh@linaro.org>
     Date:   Wed Dec 12 08:57:00 2012 +0530

 regulator: s5m8767: Fix probe failure due to stack corruption

Prior to the upstream fix, the failure manifested itself as kernel
Oops.  In CHROMIUM kernel (3.4) it quietly overwrote the i2c register
index to '0' (PMIC_ID) which led to successful return but without
writing the new voltage value.

This changelist mimics the upstream patch and can be dropped once
we've moved to 3.8 kernel.

BUG=chrome-os-partner:16430, chromium-os:38853
TEST=build & boot.  See voltage levels change based on cpufreq.

Signed-off-by: Todd Broch <tbroch@chromium.org>
Change-Id: I620f1a0487f0cce409e9fc223fb964a076e024d1
Reviewed-on: https://gerrit.chromium.org/gerrit/43129
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
drivers/regulator/s5m8767.c