diff options
author | Tomasz Figa <tomasz.figa@gmail.com> | 2018-07-17 18:05:07 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-20 18:46:47 +0100 |
commit | 925c19a8c6bb37f76f625c29fd7a59699dc8d1bc (patch) | |
tree | a38bd0c892d40c06f5a4031ab2516f38b63a1d03 /drivers/power | |
parent | 82d8a34470e96e192290885ffb54422b6f42700f (diff) | |
download | linux-stable-925c19a8c6bb37f76f625c29fd7a59699dc8d1bc.tar.gz linux-stable-925c19a8c6bb37f76f625c29fd7a59699dc8d1bc.tar.bz2 linux-stable-925c19a8c6bb37f76f625c29fd7a59699dc8d1bc.zip |
power: supply: max8998-charger: Fix platform data retrieval
[ Upstream commit cb90a2c6f77fe9b43d1e3f759bb2f13fe7fa1811 ]
Since the max8998 MFD driver supports instantiation by DT, platform data
retrieval is handled in MFD probe and cell drivers should get use
the pdata field of max8998_dev struct to obtain them.
Fixes: ee999fb3f17f ("mfd: max8998: Add support for Device Tree")
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/supply/max8998_charger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/max8998_charger.c b/drivers/power/supply/max8998_charger.c index cad7d1a8feec..aa65e6c36c55 100644 --- a/drivers/power/supply/max8998_charger.c +++ b/drivers/power/supply/max8998_charger.c @@ -86,7 +86,7 @@ static const struct power_supply_desc max8998_battery_desc = { static int max8998_battery_probe(struct platform_device *pdev) { struct max8998_dev *iodev = dev_get_drvdata(pdev->dev.parent); - struct max8998_platform_data *pdata = dev_get_platdata(iodev->dev); + struct max8998_platform_data *pdata = iodev->pdata; struct power_supply_config psy_cfg = {}; struct max8998_battery_data *max8998; struct i2c_client *i2c; |