From: Dan Carpenter <dan.carpenter@linaro.org>
To: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] regulator: Small cleanup in of_get_regulation_constraints()
Date: Sat, 1 Nov 2025 16:26:58 +0300 [thread overview]
Message-ID: <aQYKoiivuec3m0Jj@stanley.mountain> (raw)
Just pass "init_data" instead the address of it.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/regulator/of_regulator.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 32e88cada47a..33463926a2a6 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -79,10 +79,10 @@ static void of_get_regulator_prot_limits(struct device_node *np,
static int of_get_regulation_constraints(struct device *dev,
struct device_node *np,
- struct regulator_init_data **init_data,
+ struct regulator_init_data *init_data,
const struct regulator_desc *desc)
{
- struct regulation_constraints *constraints = &(*init_data)->constraints;
+ struct regulation_constraints *constraints = &init_data->constraints;
struct regulator_state *suspend_state;
struct device_node *suspend_np;
unsigned int mode;
@@ -359,7 +359,7 @@ struct regulator_init_data *of_get_regulator_init_data(struct device *dev,
if (!init_data)
return NULL; /* Out of memory? */
- if (of_get_regulation_constraints(dev, node, &init_data, desc))
+ if (of_get_regulation_constraints(dev, node, init_data, desc))
return NULL;
return init_data;
--
2.51.0
next reply other threads:[~2025-11-01 13:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-01 13:26 Dan Carpenter [this message]
2025-11-04 13:25 ` 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=aQYKoiivuec3m0Jj@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=broonie@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®