From: "Paweł Chmiel" <pawel.mikolaj.chmiel@gmail.com>
To: lgirdwood@gmail.com, broonie@kernel.org, sre@kernel.org,
lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
devicetree@vger.kernel.org, "Tomasz Figa" <tomasz.figa@gmail.com>,
"Paweł Chmiel" <pawel.mikolaj.chmiel@gmail.com>
Subject: [PATCH v2 1/3] power: supply: max8998-charger: Fix platform data retrieval
Date: Sat, 14 Jul 2018 14:26:51 +0200 [thread overview]
Message-ID: <1531571213-30593-2-git-send-email-pawel.mikolaj.chmiel@gmail.com> (raw)
In-Reply-To: <1531571213-30593-1-git-send-email-pawel.mikolaj.chmiel@gmail.com>
From: Tomasz Figa <tomasz.figa@gmail.com>
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>
---
drivers/power/supply/max8998_charger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/max8998_charger.c b/drivers/power/supply/max8998_charger.c
index b64cf0f14142..66438029bdd0 100644
--- a/drivers/power/supply/max8998_charger.c
+++ b/drivers/power/supply/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.7.4
next prev parent reply other threads:[~2018-07-14 12:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-14 12:26 [PATCH v2 0/3] power: supply: max8998-charger: Paweł Chmiel
2018-07-14 12:26 ` Paweł Chmiel [this message]
2018-07-14 12:26 ` [PATCH v2 2/3] power: supply: max8998-charger: Parse device tree for required data Paweł Chmiel
2018-07-14 12:26 ` [PATCH v2 3/3] dt-bindings: mfd: max8998: Add charger subnode binding Paweł Chmiel
2018-07-16 18:00 ` Rob Herring
2018-07-16 18:59 ` Paweł Chmiel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1531571213-30593-2-git-send-email-pawel.mikolaj.chmiel@gmail.com \
--to=pawel.mikolaj.chmiel@gmail.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=sre@kernel.org \
--cc=tomasz.figa@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).