aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/da9052-regulator.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-05-27 09:06:59 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-05-27 09:06:59 -0700
commit1b887bf31dd6e2f8cef80d205d6e9949a7dd98cc (patch)
tree25255010797ec8a1e6b418ee887410c624194c0b /drivers/regulator/da9052-regulator.c
parent30a7266f303f781d5487facff0370f27967f2e46 (diff)
parente0c21530fa91f119bfca19640a67380c6b14f12a (diff)
downloadlinux-stericsson-1b887bf31dd6e2f8cef80d205d6e9949a7dd98cc.tar.gz
Merge tag 'mfd-fixes-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Pull an MFD fix from Lee Jones: "One simple fix to repair broken regulator probe() in DA9052" * tag 'mfd-fixes-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: mfd: da9052: Fix broken regulator probe
Diffstat (limited to 'drivers/regulator/da9052-regulator.c')
-rw-r--r--drivers/regulator/da9052-regulator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index 8a4df7a1f2ee..e628d4c2f2ae 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -394,6 +394,7 @@ static inline struct da9052_regulator_info *find_regulator_info(u8 chip_id,
static int da9052_regulator_probe(struct platform_device *pdev)
{
+ const struct mfd_cell *cell = mfd_get_cell(pdev);
struct regulator_config config = { };
struct da9052_regulator *regulator;
struct da9052 *da9052;
@@ -409,7 +410,7 @@ static int da9052_regulator_probe(struct platform_device *pdev)
regulator->da9052 = da9052;
regulator->info = find_regulator_info(regulator->da9052->chip_id,
- pdev->id);
+ cell->id);
if (regulator->info == NULL) {
dev_err(&pdev->dev, "invalid regulator ID specified\n");
return -EINVAL;
@@ -419,7 +420,7 @@ static int da9052_regulator_probe(struct platform_device *pdev)
config.driver_data = regulator;
config.regmap = da9052->regmap;
if (pdata && pdata->regulators) {
- config.init_data = pdata->regulators[pdev->id];
+ config.init_data = pdata->regulators[cell->id];
} else {
#ifdef CONFIG_OF
struct device_node *nproot = da9052->dev->of_node;