From: Philipp Zabel Date: Tue, 28 Apr 2009 11:34:14 +0000 (+0200) Subject: regulator/bq24022: fix bug in is_enabled function X-Git-Tag: upstream/snapshot3+hdmi~18987^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=030853b7abdd6effb9cb44f29e60d1d7a9592210;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git regulator/bq24022: fix bug in is_enabled function This seems to be fallout from last October's regulator core rework. It got noticed only because of recent regulator framework changes. Signed-off-by: Philipp Zabel Signed-off-by: Liam Girdwood --- diff --git a/drivers/regulator/bq24022.c b/drivers/regulator/bq24022.c index 7ecb820..d08cd9b 100644 --- a/drivers/regulator/bq24022.c +++ b/drivers/regulator/bq24022.c @@ -61,8 +61,7 @@ static int bq24022_disable(struct regulator_dev *rdev) static int bq24022_is_enabled(struct regulator_dev *rdev) { - struct platform_device *pdev = rdev_get_drvdata(rdev); - struct bq24022_mach_info *pdata = pdev->dev.platform_data; + struct bq24022_mach_info *pdata = rdev_get_drvdata(rdev); return !gpio_get_value(pdata->gpio_nce); }