From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
linux-kernel@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org, Tony Lindgren <tony@atomide.com>,
linux-omap@vger.kernel.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Gregory CLEMENT <gregory.clement@bootlin.com>
Subject: [PATCH 2/3] regulator: twl6030: use variable for device node
Date: Thu, 25 Jul 2019 11:45:41 +0200 [thread overview]
Message-ID: <20190725094542.16547-3-gregory.clement@bootlin.com> (raw)
In-Reply-To: <20190725094542.16547-1-gregory.clement@bootlin.com>
Instead of refering the full pdev->dev.of_node use a local variable.
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
---
drivers/regulator/twl6030-regulator.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/twl6030-regulator.c b/drivers/regulator/twl6030-regulator.c
index 5fe208b381eb..d73c81542ceb 100644
--- a/drivers/regulator/twl6030-regulator.c
+++ b/drivers/regulator/twl6030-regulator.c
@@ -665,14 +665,14 @@ static int twlreg_probe(struct platform_device *pdev)
struct regulation_constraints *c;
struct regulator_dev *rdev;
struct regulator_config config = { };
+ struct device_node *np = pdev->dev.of_node;
template = of_device_get_match_data(&pdev->dev);
if (!template)
return -ENODEV;
id = template->desc.id;
- initdata = of_get_regulator_init_data(&pdev->dev, pdev->dev.of_node,
- &template->desc);
+ initdata = of_get_regulator_init_data(&pdev->dev, np, &template->desc);
if (!initdata)
return -EINVAL;
@@ -713,7 +713,7 @@ static int twlreg_probe(struct platform_device *pdev)
config.dev = &pdev->dev;
config.init_data = initdata;
config.driver_data = info;
- config.of_node = pdev->dev.of_node;
+ config.of_node = np;
rdev = devm_regulator_register(&pdev->dev, &info->desc, &config);
if (IS_ERR(rdev)) {
--
2.20.1
next prev parent reply other threads:[~2019-07-25 9:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 9:45 [PATCH 0/3] regulator: twl6030: Fix the VMMC reset behavior Gregory CLEMENT
2019-07-25 9:45 ` [PATCH 1/3] dt-bindings: regulator: twl6030: Add retain-on-reset property Gregory CLEMENT
2019-08-12 13:10 ` Applied "dt-bindings: regulator: twl6030: Add retain-on-reset property" to the regulator tree Mark Brown
2019-07-25 9:45 ` Gregory CLEMENT [this message]
2019-08-12 13:10 ` Applied "regulator: twl6030: use variable for device node" " Mark Brown
2019-07-25 9:45 ` [PATCH 3/3] regulator: twl6030: workaround the VMMC reset behavior Gregory CLEMENT
2019-08-12 13:10 ` Applied "regulator: twl6030: workaround the VMMC reset behavior" to the regulator tree Mark Brown
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=20190725094542.16547-3-gregory.clement@bootlin.com \
--to=gregory.clement@bootlin.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=tony@atomide.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).