2011-03-29 09:55:08

by Axel Lin

[permalink] [raw]
Subject: [PATCH v2] regulator: Add missing platform_set_drvdata in tps6105x_regulator_probe

Otherwise, calling platform_get_drvdata in tps6105x_regulator_remove
returns NULL.

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Mark Brown <[email protected]>
---
v2: update commit log

drivers/regulator/tps6105x-regulator.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/tps6105x-regulator.c b/drivers/regulator/tps6105x-regulator.c
index 1661499..5f975c2 100644
--- a/drivers/regulator/tps6105x-regulator.c
+++ b/drivers/regulator/tps6105x-regulator.c
@@ -158,6 +158,7 @@ static int __devinit tps6105x_regulator_probe(struct platform_device *pdev)
"failed to register regulator\n");
return ret;
}
+ platform_set_drvdata(pdev, tps6105x);

return 0;
}
--
1.7.1



2011-03-29 23:15:11

by Liam Girdwood

[permalink] [raw]
Subject: Re: [PATCH v2] regulator: Add missing platform_set_drvdata in tps6105x_regulator_probe

On Tue, 2011-03-29 at 17:54 +0800, Axel Lin wrote:
> Otherwise, calling platform_get_drvdata in tps6105x_regulator_remove
> returns NULL.
>
> Signed-off-by: Axel Lin <[email protected]>
> Acked-by: Mark Brown <[email protected]>
> ---

Applied.

Thanks

Liam