Patch "regulator: core: Fix resolve supply lookup issue" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    regulator: core: Fix resolve supply lookup issue

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     regulator-core-fix-resolve-supply-lookup-issue.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 79e8ff7e38970b9790dc5121374c5a3ace285900
Author: ChiYuan Huang <cy_huang@xxxxxxxxxxx>
Date:   Wed Dec 14 09:37:11 2022 +0800

    regulator: core: Fix resolve supply lookup issue
    
    [ Upstream commit 0debed5b117d11e33cba52870c4dcb64f5911891 ]
    
    From Marek's log, the previous change modify the parent of rdev.
    https://lore.kernel.org/all/58b92e75-f373-dae7-7031-8abd465bb874@xxxxxxxxxxx/
    
    In 'regulator_resolve_supply', it uses the parent DT node of rdev as the
    DT-lookup starting node. But the parent DT node may not exist. This will
    cause the NULL supply issue.
    
    This patch modify the parent of rdev back to the device that provides
    from 'regulator_config' in 'regulator_register'.
    
    Fixes: 8f3cbcd6b440 ("regulator: core: Use different devices for resource allocation and DT lookup")
    Reported-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
    Tested-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
    Signed-off-by: ChiYuan Huang <cy_huang@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/1670981831-12583-1-git-send-email-u0084500@xxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index c095ca9f01e8..93da2b4cbc72 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -5531,7 +5531,7 @@ regulator_register(struct device *dev,
 
 	/* register with sysfs */
 	rdev->dev.class = &regulator_class;
-	rdev->dev.parent = dev;
+	rdev->dev.parent = config->dev;
 	dev_set_name(&rdev->dev, "regulator.%lu",
 		    (unsigned long) atomic_inc_return(&regulator_no));
 	dev_set_drvdata(&rdev->dev, rdev);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux