From: Marco Felsch <m.felsch@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 01/11] regulator: rename variable rd to rdev
Date: Wed, 20 Sep 2023 13:15:13 +0200 [thread overview]
Message-ID: <20230920111513.mk2i2j3qecd47uds@pengutronix.de> (raw)
In-Reply-To: <20230920103316.2758383-2-s.hauer@pengutronix.de>
On 23-09-20, Sascha Hauer wrote:
> the struct regulator_dev * variable is mostly named 'rdev', but
> sometimes 'rd' is used. Rename to 'rdev' consistently.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> drivers/regulator/core.c | 32 ++++++++++++++++----------------
> 1 file changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index 97e76b0db9..e9b5b82dbe 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -166,13 +166,13 @@ static int regulator_resolve_supply(struct regulator_dev *rdev)
> return 0;
> }
>
> -static struct regulator_internal * __regulator_register(struct regulator_dev *rd, const char *name)
> +static struct regulator_internal * __regulator_register(struct regulator_dev *rdev, const char *name)
> {
> struct regulator_internal *ri;
> int ret;
>
> ri = xzalloc(sizeof(*ri));
> - ri->rdev = rd;
> + ri->rdev = rdev;
>
> INIT_LIST_HEAD(&ri->consumer_list);
>
> @@ -181,7 +181,7 @@ static struct regulator_internal * __regulator_register(struct regulator_dev *rd
> if (name)
> ri->name = xstrdup(name);
>
> - if (rd->boot_on || rd->always_on) {
> + if (rdev->boot_on || rdev->always_on) {
> ret = regulator_resolve_supply(ri->rdev);
> if (ret < 0)
> goto err;
> @@ -204,38 +204,38 @@ static struct regulator_internal * __regulator_register(struct regulator_dev *rd
> #ifdef CONFIG_OFDEVICE
> /*
> * of_regulator_register - register a regulator corresponding to a device_node
> - * @rd: the regulator device providing the ops
> + * rdev: the regulator device providing the ops
> * @node: the device_node this regulator corresponds to
> *
> * Return: 0 for success or a negative error code
> */
> -int of_regulator_register(struct regulator_dev *rd, struct device_node *node)
> +int of_regulator_register(struct regulator_dev *rdev, struct device_node *node)
> {
> struct regulator_internal *ri;
> const char *name;
>
> - if (!rd || !node)
> + if (!rdev || !node)
> return -EINVAL;
>
> - rd->boot_on = of_property_read_bool(node, "regulator-boot-on");
> - rd->always_on = of_property_read_bool(node, "regulator-always-on");
> + rdev->boot_on = of_property_read_bool(node, "regulator-boot-on");
> + rdev->always_on = of_property_read_bool(node, "regulator-always-on");
>
> name = of_get_property(node, "regulator-name", NULL);
> if (!name)
> name = node->name;
>
> - ri = __regulator_register(rd, name);
> + ri = __regulator_register(rdev, name);
> if (IS_ERR(ri))
> return PTR_ERR(ri);
>
> ri->node = node;
> - node->dev = rd->dev;
> + node->dev = rdev->dev;
>
> - if (rd->desc->off_on_delay)
> - ri->enable_time_us = rd->desc->off_on_delay;
> + if (rdev->desc->off_on_delay)
> + ri->enable_time_us = rdev->desc->off_on_delay;
>
> - if (rd->desc->fixed_uV && rd->desc->n_voltages == 1)
> - ri->min_uv = ri->max_uv = rd->desc->fixed_uV;
> + if (rdev->desc->fixed_uV && rdev->desc->n_voltages == 1)
> + ri->min_uv = ri->max_uv = rdev->desc->fixed_uV;
>
> of_property_read_u32(node, "regulator-enable-ramp-delay",
> &ri->enable_time_us);
> @@ -333,11 +333,11 @@ static struct regulator_internal *of_regulator_get(struct device *dev,
> }
> #endif
>
> -int dev_regulator_register(struct regulator_dev *rd, const char * name, const char* supply)
> +int dev_regulator_register(struct regulator_dev *rdev, const char * name, const char* supply)
> {
> struct regulator_internal *ri;
>
> - ri = __regulator_register(rd, name);
> + ri = __regulator_register(rdev, name);
>
> ri->supply = supply;
>
> --
> 2.39.2
>
>
>
next prev parent reply other threads:[~2023-09-20 11:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 10:33 [PATCH 00/11] regulator updates Sascha Hauer
2023-09-20 10:33 ` [PATCH 01/11] regulator: rename variable rd to rdev Sascha Hauer
2023-09-20 11:15 ` Marco Felsch [this message]
2023-09-20 10:33 ` [PATCH 02/11] regulator: merge struct regulator_internal fields into struct regulator_dev Sascha Hauer
2023-09-20 10:52 ` Marco Felsch
2023-09-20 11:07 ` Sascha Hauer
2023-09-20 11:13 ` Marco Felsch
2023-09-20 11:20 ` Marco Felsch
2023-09-20 10:33 ` [PATCH 03/11] regulator: introduce regulator logging functions Sascha Hauer
2023-09-20 11:22 ` Marco Felsch
2023-09-20 10:33 ` [PATCH 04/11] regulator: add regulator_get_voltage_internal() Sascha Hauer
2023-09-20 11:25 ` Marco Felsch
2023-09-20 11:45 ` Sascha Hauer
2023-09-20 10:33 ` [PATCH 05/11] regulator: Add missing cases in regulator_map_voltage() Sascha Hauer
2023-09-20 11:28 ` Marco Felsch
2023-09-20 10:33 ` [PATCH 06/11] regulator: stpmic1: add .get_voltage_sel Sascha Hauer
2023-09-20 11:29 ` Marco Felsch
2023-09-20 10:33 ` [PATCH 07/11] regulator: stpmic1: add .supply_name Sascha Hauer
2023-09-20 11:36 ` Marco Felsch
2023-09-20 10:33 ` [PATCH 08/11] regulator: register regulator as last step in of_regulator_register() Sascha Hauer
2023-09-20 11:39 ` Marco Felsch
2023-09-20 10:33 ` [PATCH 09/11] regulator: Set initial voltage Sascha Hauer
2023-09-20 11:51 ` Marco Felsch
2023-09-20 10:33 ` [PATCH 10/11] regulator: drop struct regulator_dev::supply_name Sascha Hauer
2023-09-20 11:51 ` Marco Felsch
2023-09-20 10:33 ` [PATCH 11/11] regulator: print regulator tree Sascha Hauer
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=20230920111513.mk2i2j3qecd47uds@pengutronix.de \
--to=m.felsch@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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