[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191122100746.610472481@linuxfoundation.org>
Date: Fri, 22 Nov 2019 11:27:25 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Tomasz Figa <tomasz.figa@...il.com>,
Paweł Chmiel <pawel.mikolaj.chmiel@...il.com>,
Sebastian Reichel <sebastian.reichel@...labora.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 4.4 054/159] power: supply: max8998-charger: Fix platform data retrieval
From: Tomasz Figa <tomasz.figa@...il.com>
[ 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@...il.com>
Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@...il.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@...labora.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/power/max8998_charger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/max8998_charger.c b/drivers/power/max8998_charger.c
index b64cf0f141425..66438029bdd0c 100644
--- a/drivers/power/max8998_charger.c
+++ b/drivers/power/max8998_charger.c
@@ -85,7 +85,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;
--
2.20.1
Powered by blists - more mailing lists