aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>2014-03-18 09:11:26 -0400
committerLee Jones <lee.jones@linaro.org>2014-03-20 11:57:23 -0400
commit5a78401623740c892868d5929b33f5cda8fe819e (patch)
treec2b5abddc299f5b24456010c32f179b29580a804 /drivers/mfd
parent742766aac563ea1c28e9f86ed53db757a2872081 (diff)
mfd: sec-core: Fix uninitialized 'regmap_rtc' on S2MPA01
Initialize the 'regmap_rtc' on S2MPA01 to some sane value. Sane at least for S5M87X chipsets, not S2MPS/S2MPA but it won't be used because rtc-s5m driver does not support S2MPA01. This fixes following error: drivers/mfd/sec-core.c:342:45: warning: ‘regmap_rtc’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/sec-core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
index 91405e94cfee..1cf27521fff4 100644
--- a/drivers/mfd/sec-core.c
+++ b/drivers/mfd/sec-core.c
@@ -298,6 +298,13 @@ static int sec_pmic_probe(struct i2c_client *i2c,
298 switch (sec_pmic->device_type) { 298 switch (sec_pmic->device_type) {
299 case S2MPA01: 299 case S2MPA01:
300 regmap = &s2mpa01_regmap_config; 300 regmap = &s2mpa01_regmap_config;
301 /*
302 * The rtc-s5m driver does not support S2MPA01 and there
303 * is no mfd_cell for S2MPA01 RTC device.
304 * However we must pass something to devm_regmap_init_i2c()
305 * so use S5M-like regmap config even though it wouldn't work.
306 */
307 regmap_rtc = &s5m_rtc_regmap_config;
301 break; 308 break;
302 case S2MPS11X: 309 case S2MPS11X:
303 regmap = &s2mps11_regmap_config; 310 regmap = &s2mps11_regmap_config;