regulator: even more OF node imbalance fixes
Subsystems (3)
cover regulator: even more OF node imbalance fixes
I missed these drivers which probably meant to set config->of_node in my previous rounds.
Johan
Johan Hovold (2):
regulator: act8945a: fix OF node reference imbalance
regulator: bd9571mwv: fix OF node reference imbalance
drivers/regulator/act8945a-regulator.c | 3 ++- drivers/regulator/bd9571mwv-regulator.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
2.52.0
PATCH 1/2 regulator: act8945a: fix OF node reference imbalance
The driver reuses the OF node of the parent multi-function device but fails to take another reference to balance the one dropped by the platform bus code when unbinding the MFD and deregistering the child devices.
Fix this by using the intended helper for reusing OF nodes.
--- drivers/regulator/act8945a-regulator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/regulator/act8945a-regulator.c +2 -1
@@ -302,8 +302,9 @@ static int act8945a_pmic_probe(struct platform_device *pdev) num_regulators =ARRAY_SIZE (act8945a_regulators); } +device_set_of_node_from_dev (&pdev->dev, pdev->dev.parent); + config.dev = &pdev->dev; - config.dev->of_node = pdev->dev.parent->of_node; config.driver_data = act8945a;for (i =0 ; i < num_regulators; i++) { rdev = devm_regulator_register(&pdev->dev, ®ulators[i],
Signature · 1 line
2.52.0
PATCH 2/2 regulator: bd9571mwv: fix OF node reference imbalance
In reply to Johan HovoldThe driver reuses the OF node of the parent multi-function device but fails to take another reference to balance the one dropped by the platform bus code when unbinding the MFD and deregistering the child devices.
Fix this by using the intended helper for reusing OF nodes.
--- drivers/regulator/bd9571mwv-regulator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/regulator/bd9571mwv-regulator.c +2 -1
@@ -287,8 +287,9 @@ static int bd9571mwv_regulator_probe(struct platform_device *pdev)platform_set_drvdata (pdev, bdreg); +device_set_of_node_from_dev (&pdev->dev, pdev->dev.parent); + config.dev = &pdev->dev; - config.dev->of_node = pdev->dev.parent->of_node; config.driver_data = bdreg; config.regmap = bdreg->regmap;
Signature · 1 line
2.52.0
Mark Brown
maintainerQuoted 2 lines · Johan Hovold
I missed these drivers which probably meant to set
config->of_nodein my previous rounds.
It would be somewhat easier to just send individual patches for all these things, there's no real interrelationship between the patches other than the similarity of the issus.
Quoted 8 lines · Mark Brown
Quoted 2 lines · Johan Hovold
I missed these drivers which probably meant to set
config->of_nodein my previous rounds.It would be somewhat easier to just send individual patches for all these things, there's no real interrelationship between the patches other than the similarity of the issus.
Possibly in this case, but not if there is any feedback that applies to all patches in the series.
I assume you don't want me to resend these now, though?
Johan
Mark Brown
maintainerQuoted 8 lines · Johan Hovold
Quoted 3 lines · Mark Brown
It would be somewhat easier to just send individual patches for all these things, there's no real interrelationship between the patches other than the similarity of the issus.
Possibly in this case, but not if there is any feedback that applies to all patches in the series.
Once you're sending multiple similiar followup serieses that
Quoted 1 line
I assume you don't want me to resend these now, though?
Right, please don't.