From: Anton Vorontsov Date: Tue, 25 Sep 2012 02:10:08 +0000 (-0700) Subject: Merge with upstream to accommodate with MFD changes X-Git-Tag: firefly_0821_release~3680^2~1907^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=18766f0936d444fd7ff2e0064bd6e69a89d5c6fc;p=firefly-linux-kernel-4.4.55.git Merge ... upstream to accommodate with MFD changes 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 Reported-by: Fengguang Wu Reported-by: Samuel Ortiz Signed-off-by: Anton Vorontsov --- 18766f0936d444fd7ff2e0064bd6e69a89d5c6fc diff --cc drivers/mfd/88pm860x-core.c index 76b5b7daf65d,b73f033b2c60..2abd607eb05b --- a/drivers/mfd/88pm860x-core.c +++ b/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"); + + 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, 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,