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)
commit5db5dd5be70eaf808d9fd90174b957fc5c2912cb
treeaa7d4f6809eace3a4441e4bf059344760acf883a
parent6549c46af8551b346bcc0b9043f93848319acd5c
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: 9bc146acc331 ("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