Skip to contentSkip to conversation

regulator/bq24022: fix bug in is_enabled function

PATCH Applied Philipp Zabel 2 participants 2 messages Apr 28, 2009 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/regulator/bq24022.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/regulator/bq24022.c +1 -2
index 7ecb820..d08cd9b 100644
@@ -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);
 }
Signature · 1 line
1.6.2.4
#1 lore raw
Quoted 8 lines · Philipp Zabel

This seems to be fallout from last October's regulator core rework. It got noticed only because of recent regulator framework changes.

---
 drivers/regulator/bq24022.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Applied.

Thanks

Liam