mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: Kukjin Kim <kgene.kim@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Olof Johansson <olof@lixom.net>, Chris Zhong <zyw@rock-chips.com>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	Abhilash Kesavan <kesavan.abhilash@gmail.com>,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v5 3/5] regulator: of: Add regulator desc param to of_get_regulator_init_data()
Date: Fri, 7 Nov 2014 15:07:43 +0000	[thread overview]
Message-ID: <20141107150743.GR8509@sirena.org.uk> (raw)
In-Reply-To: <1415365205-27630-4-git-send-email-javier.martinez@collabora.co.uk>

[-- Attachment #1: Type: text/plain, Size: 1327 bytes --]

On Fri, Nov 07, 2014 at 02:00:03PM +0100, Javier Martinez Canillas wrote:

> -	initdata = of_get_regulator_init_data(dev, np);
>  	sreg = devm_kzalloc(dev, sizeof(*sreg), GFP_KERNEL);
>  	if (!sreg)
>  		return -ENOMEM;
> -	sreg->initdata = initdata;
>  	sreg->name = of_get_property(np, "regulator-name", NULL);
>  	rdesc = &sreg->rdesc;
> +	initdata = of_get_regulator_init_data(dev, np, rdesc);
> +	sreg->initdata = initdata;
>  	rdesc->name = sreg->name;
>  	rdesc->type = REGULATOR_VOLTAGE;
>  	rdesc->owner = THIS_MODULE;

This is using the regulator descriptor before it is initialized which
doesn't seem ideal...

> +++ b/include/linux/regulator/of_regulator.h
> @@ -6,6 +6,8 @@
>  #ifndef __LINUX_OF_REG_H
>  #define __LINUX_OF_REG_H
>  
> +#include <linux/regulator/driver.h>
> +
>  struct of_regulator_match {
>  	const char *name;
>  	void *driver_data;
> @@ -16,14 +18,16 @@ struct of_regulator_match {
>  #if defined(CONFIG_OF)
>  extern struct regulator_init_data
>  	*of_get_regulator_init_data(struct device *dev,
> -				    struct device_node *node);
> +				    struct device_node *node,
> +				    const struct regulator_desc *desc);

This is just adding the include to get the declaration of regulator_desc
as far as I can see, add a forward declaration of it instead.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2014-11-07 16:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07 13:00 [PATCH v5 0/5] regulator: of: Add initial and suspend modes support Javier Martinez Canillas
2014-11-07 13:00 ` [PATCH v5 1/5] regulator: Document binding for initial and suspend modes Javier Martinez Canillas
2014-11-07 14:58   ` Mark Brown
2014-11-07 15:38     ` Javier Martinez Canillas
2014-11-07 16:10       ` Mark Brown
2014-11-07 16:19         ` Javier Martinez Canillas
2014-11-07 13:00 ` [PATCH v5 2/5] regulator: Add function to map modes to struct regulator_desc Javier Martinez Canillas
2014-11-07 15:54   ` Mark Brown
2014-11-07 16:17     ` Javier Martinez Canillas
2014-11-07 13:00 ` [PATCH v5 3/5] regulator: of: Add regulator desc param to of_get_regulator_init_data() Javier Martinez Canillas
2014-11-07 15:07   ` Mark Brown [this message]
2014-11-07 15:49     ` Javier Martinez Canillas
2014-11-07 15:23   ` Krzysztof Kozlowski
2014-11-07 16:11     ` Javier Martinez Canillas
2014-11-07 13:00 ` [PATCH v5 4/5] regulator: of: Pass the regulator description in the match table Javier Martinez Canillas
2014-11-07 13:00 ` [PATCH v5 5/5] regulator: of: Add support for parsing initial and suspend modes Javier Martinez Canillas
2014-11-07 15:47   ` Mark Brown
2014-11-07 16:15     ` Javier Martinez Canillas
2014-11-07 16:21       ` Mark Brown
2014-11-07 15:26 ` [PATCH v5 0/5] regulator: of: Add initial and suspend modes support Krzysztof Kozlowski

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=20141107150743.GR8509@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=javier.martinez@collabora.co.uk \
    --cc=k.kozlowski@samsung.com \
    --cc=kesavan.abhilash@gmail.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=zyw@rock-chips.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

all inboxes | Powered by JetHome®