summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2021-06-16 11:44:58 +0800
committerMark Brown <broonie@kernel.org>2021-06-16 15:41:19 +0100
commit830c364f4a2299e8215c40f0a2ba9229c0fdeede (patch)
tree6b427076c3dc681960f7b527828272a63667c0d5 /drivers/regulator
parent31a89d297e196472875dc7d4a8f5dd0aaefcc0b4 (diff)
regulator: sy7636a: Use rdev_get_drvdata at proper place
At the context with *rdev, use rdev_get_drvdata() is more intuitive. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Alistair Francis <alistair@alistair23.me> Link: https://lore.kernel.org/r/20210616034458.3499522-3-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/sy7636a-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c
index c71c0a007d95..e021ae08cbaa 100644
--- a/drivers/regulator/sy7636a-regulator.c
+++ b/drivers/regulator/sy7636a-regulator.c
@@ -35,7 +35,7 @@ static int sy7636a_get_vcom_voltage_op(struct regulator_dev *rdev)
static int sy7636a_get_status(struct regulator_dev *rdev)
{
- struct sy7636a *sy7636a = dev_get_drvdata(rdev->dev.parent);
+ struct sy7636a *sy7636a = rdev_get_drvdata(rdev);
int ret = 0;
ret = gpiod_get_value_cansleep(sy7636a->pgood_gpio);