]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
regulator/bq24022: fix bug in is_enabled function
authorPhilipp Zabel <philipp.zabel@gmail.com>
Tue, 28 Apr 2009 11:34:14 +0000 (13:34 +0200)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Tue, 28 Apr 2009 17:58:08 +0000 (18:58 +0100)
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 <philipp.zabel@gmail.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/bq24022.c

index 7ecb820ceebc5b21568ef80c07b019041df7a2d6..d08cd9b66c6dde8777af20b39b0dff428193bf2d 100644 (file)
@@ -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);
 }