]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: hi6421v600: Fix getting wrong drvdata that causes boot failure
authorAxel Lin <axel.lin@ingics.com>
Wed, 30 Jun 2021 07:42:46 +0000 (15:42 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 30 Jun 2021 12:49:32 +0000 (13:49 +0100)
commit224e6e2ef723cbb79ed93cf6fa2f360d37c39cb2
treeaa7d4f6809eace3a4441e4bf059344760acf883a
parentda26a2590bf2f77a1e8826bdfa9aac96d8120841
regulator: hi6421v600: Fix getting wrong drvdata that causes boot failure

Since config.dev = pdev->dev.parent in current code, so
dev_get_drvdata(rdev->dev.parent) actually returns the drvdata of the mfd
device rather than the regulator. Fix it.

Fixes: 302d1fb2f278 ("regulator: hi6421v600: Fix setting wrong driver_data")
Reported-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/20210630074246.2305166-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/hi6421v600-regulator.c