Skip to content

Commit

Permalink
regulator/bq24022: fix bug in is_enabled function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Philipp Zabel authored and Liam Girdwood committed Apr 28, 2009
1 parent aa61d55 commit 030853b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/regulator/bq24022.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 030853b

Please sign in to comment.