Merge with upstream to accommodate with MFD changes
authorAnton Vorontsov <anton.vorontsov@linaro.org>
Tue, 25 Sep 2012 02:10:08 +0000 (19:10 -0700)
committerAnton Vorontsov <anton.vorontsov@linaro.org>
Tue, 25 Sep 2012 02:12:01 +0000 (19:12 -0700)
commit 0848c94fb4 ("mfd: core: Push irqdomain mapping out into devices")
that appeared in v3.6-rc6 adds another argument to the mfd_add_devices()
call, and that makes commit a830d28b48bf ("power_supply: Enable
battery-charger for 88pm860x", which is battery tree) no longer compatible
with the latest kernels.

This commit is used to merge upstream back into battery tree and
accommodate 88pm860x driver for the latest changes in MFD core.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reported-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
1  2 
drivers/mfd/88pm860x-core.c

@@@ -795,22 -788,9 +795,22 @@@ static void __devinit device_power_init
        power_devs[2].num_resources = ARRAY_SIZE(preg_resources);
        power_devs[2].resources = &preg_resources[0],
        ret = mfd_add_devices(chip->dev, 0, &power_devs[2], 1,
-                             &preg_resources[0], chip->irq_base);
+                             &preg_resources[0], chip->irq_base, NULL);
        if (ret < 0)
                dev_err(chip->dev, "Failed to add preg subdev\n");
-                                     NULL, chip->irq_base);
 +
 +      if (pdata->chg_desc) {
 +              pdata->chg_desc->charger_regulators =
 +                      &chg_desc_regulator_data[0];
 +              pdata->chg_desc->num_charger_regulators =
 +                      ARRAY_SIZE(chg_desc_regulator_data),
 +              power_devs[3].platform_data = pdata->chg_desc;
 +              power_devs[3].pdata_size = sizeof(*pdata->chg_desc);
 +              ret = mfd_add_devices(chip->dev, 0, &power_devs[3], 1,
++                                    NULL, chip->irq_base, NULL);
 +              if (ret < 0)
 +                      dev_err(chip->dev, "Failed to add chg-manager subdev\n");
 +      }
  }
  
  static void __devinit device_onkey_init(struct pm860x_chip *chip,