summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-09-27 15:25:55 +0200
committerLee Jones <lee.jones@linaro.org>2013-10-23 17:21:41 +0200
commit22d7dc8aba3bf34fdf324f43718c238075cc7cf7 (patch)
tree94d110c29650c6b3529f3fbdfeecbe128ed96ddf /drivers/mfd
parentmfd: palmas: Fix resource leak of i2c_dummy devices (diff)
downloadlinux-22d7dc8aba3bf34fdf324f43718c238075cc7cf7.tar.xz
linux-22d7dc8aba3bf34fdf324f43718c238075cc7cf7.zip
mfd: arizona: Only attempt to parse DT if platform data was not passed
If platform data is passed when probing the device then it should take precedence over Device Tree. This patch saves cycles in the pdata case and prevents error messages when DT is not passed. Reported-by: Mark Brown <broonie@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/arizona-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/arizona-core.c b/drivers/mfd/arizona-core.c
index 5ac3aa48473b..a2f5beff99d7 100644
--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -607,11 +607,11 @@ int arizona_dev_init(struct arizona *arizona)
dev_set_drvdata(arizona->dev, arizona);
mutex_init(&arizona->clk_lock);
- arizona_of_get_core_pdata(arizona);
-
if (dev_get_platdata(arizona->dev))
memcpy(&arizona->pdata, dev_get_platdata(arizona->dev),
sizeof(arizona->pdata));
+ else
+ arizona_of_get_core_pdata(arizona);
regcache_cache_only(arizona->regmap, true);