Merge branch 'for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[safe/jmp/linux-2.6] / drivers / regulator / bq24022.c
index 7ecb820..068d488 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);
 }
@@ -79,6 +78,7 @@ static struct regulator_desc bq24022_desc = {
        .name  = "bq24022",
        .ops   = &bq24022_ops,
        .type  = REGULATOR_CURRENT,
+       .owner = THIS_MODULE,
 };
 
 static int __init bq24022_probe(struct platform_device *pdev)