* [PATCH 1/2] regulator: dummy: Specify a struct device
@ 2012-05-08 17:16 Mark Brown
2012-05-08 17:16 ` [PATCH 2/2] regulator: core: Warn on missing " Mark Brown
2012-05-10 9:21 ` [PATCH 1/2] regulator: dummy: Specify a " Liam Girdwood
0 siblings, 2 replies; 3+ messages in thread
From: Mark Brown @ 2012-05-08 17:16 UTC (permalink / raw)
To: Liam Girdwood; +Cc: linux-kernel, Mark Brown
This will be becoming mandatory.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/regulator/dummy.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/regulator/dummy.c b/drivers/regulator/dummy.c
index 1571bee..86f655c 100644
--- a/drivers/regulator/dummy.c
+++ b/drivers/regulator/dummy.c
@@ -42,6 +42,7 @@ static int __devinit dummy_regulator_probe(struct platform_device *pdev)
struct regulator_config config = { };
int ret;
+ config.dev = &pdev->dev;
config.init_data = &dummy_initdata;
dummy_regulator_rdev = regulator_register(&dummy_desc, &config);
--
1.7.10
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] regulator: core: Warn on missing struct device
2012-05-08 17:16 [PATCH 1/2] regulator: dummy: Specify a struct device Mark Brown
@ 2012-05-08 17:16 ` Mark Brown
2012-05-10 9:21 ` [PATCH 1/2] regulator: dummy: Specify a " Liam Girdwood
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-05-08 17:16 UTC (permalink / raw)
To: Liam Girdwood; +Cc: linux-kernel, Mark Brown
The core really wants a struct device to be supplied for regulators and
there's no reason this should be impossible so provide one so complain
if we didn't get one.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/regulator/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index c597868..f899af5 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2981,6 +2981,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
return ERR_PTR(-EINVAL);
dev = config->dev;
+ WARN_ON(!dev);
if (regulator_desc->name == NULL || regulator_desc->ops == NULL)
return ERR_PTR(-EINVAL);
--
1.7.10
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] regulator: dummy: Specify a struct device
2012-05-08 17:16 [PATCH 1/2] regulator: dummy: Specify a struct device Mark Brown
2012-05-08 17:16 ` [PATCH 2/2] regulator: core: Warn on missing " Mark Brown
@ 2012-05-10 9:21 ` Liam Girdwood
1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2012-05-10 9:21 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel
On Tue, 2012-05-08 at 18:16 +0100, Mark Brown wrote:
> This will be becoming mandatory.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> drivers/regulator/dummy.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/regulator/dummy.c b/drivers/regulator/dummy.c
> index 1571bee..86f655c 100644
> --- a/drivers/regulator/dummy.c
> +++ b/drivers/regulator/dummy.c
> @@ -42,6 +42,7 @@ static int __devinit dummy_regulator_probe(struct platform_device *pdev)
> struct regulator_config config = { };
> int ret;
>
> + config.dev = &pdev->dev;
> config.init_data = &dummy_initdata;
>
> dummy_regulator_rdev = regulator_register(&dummy_desc, &config);
Both
Acked-by: Liam Girdwood <lrg@ti.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-10 9:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-08 17:16 [PATCH 1/2] regulator: dummy: Specify a struct device Mark Brown
2012-05-08 17:16 ` [PATCH 2/2] regulator: core: Warn on missing " Mark Brown
2012-05-10 9:21 ` [PATCH 1/2] regulator: dummy: Specify a " Liam Girdwood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox