From: Axel Lin Date: Wed, 16 Jun 2021 03:44:58 +0000 (+0800) Subject: regulator: sy7636a: Use rdev_get_drvdata at proper place X-Git-Tag: v5.14-rc1~188^2^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=830c364f4a2299e8215c40f0a2ba9229c0fdeede;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Alistair Francis Link: https://lore.kernel.org/r/20210616034458.3499522-3-axel.lin@ingics.com Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c index c71c0a007d957..e021ae08cbaa4 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);