struct wm8994_ldo {
int enable;
- int is_enabled;
+ bool is_enabled;
struct regulator_dev *regulator;
struct wm8994 *wm8994;
};
return 0;
gpio_set_value(ldo->enable, 1);
- ldo->is_enabled = 1;
+ ldo->is_enabled = true;
return 0;
}
return -EINVAL;
gpio_set_value(ldo->enable, 0);
- ldo->is_enabled = 0;
+ ldo->is_enabled = false;
return 0;
}
ldo->wm8994 = wm8994;
- ldo->is_enabled = 1;
+ ldo->is_enabled = true;
if (pdata->ldo[id].enable && gpio_is_valid(pdata->ldo[id].enable)) {
ldo->enable = pdata->ldo[id].enable;
{
struct wm8994_ldo *ldo = platform_get_drvdata(pdev);
+ platform_set_drvdata(pdev, NULL);
+
regulator_unregister(ldo->regulator);
if (gpio_is_valid(ldo->enable))
gpio_free(ldo->enable);
.remove = __devexit_p(wm8994_ldo_remove),
.driver = {
.name = "wm8994-ldo",
+ .owner = THIS_MODULE,
},
};