projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9cd752
)
regulator: mtk-dvfsrc: Fix wrong dev pointer for devm_regulator_register
author
Axel Lin
<axel.lin@ingics.com>
Fri, 2 Jul 2021 14:21:40 +0000
(22:21 +0800)
committer
Mark Brown
<broonie@kernel.org>
Wed, 7 Jul 2021 11:01:32 +0000
(12:01 +0100)
If use dev->parent, the regulator_unregister will not be called when this
driver is unloaded. Fix it by using dev instead.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link:
https://lore.kernel.org/r/20210702142140.2678130-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/mtk-dvfsrc-regulator.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/mtk-dvfsrc-regulator.c
b/drivers/regulator/mtk-dvfsrc-regulator.c
index d3d876198d6ece3437f1851ad66d12017643e354..234af3a66c77df8fe429bc8772a4848b6fed4e55 100644
(file)
--- a/
drivers/regulator/mtk-dvfsrc-regulator.c
+++ b/
drivers/regulator/mtk-dvfsrc-regulator.c
@@
-179,8
+179,7
@@
static int dvfsrc_vcore_regulator_probe(struct platform_device *pdev)
for (i = 0; i < regulator_init_data->size; i++) {
config.dev = dev->parent;
config.driver_data = (mt_regulators + i);
- rdev = devm_regulator_register(dev->parent,
- &(mt_regulators + i)->desc,
+ rdev = devm_regulator_register(dev, &(mt_regulators + i)->desc,
&config);
if (IS_ERR(rdev)) {
dev_err(dev, "failed to register %s\n",