Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185670
b: refs/heads/master
c: 8ab3343
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Torokhov authored and Liam Girdwood committed Mar 3, 2010
1 parent 3a2b09a commit bf65a88
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98bf7c057b35eaf418ac063c4aba4f9f86220b09
refs/heads/master: 8ab3343dc61552cb8ad653e1013b1853cea9bea6
19 changes: 10 additions & 9 deletions trunk/drivers/regulator/fixed.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ struct fixed_voltage_data {
int microvolts;
int gpio;
unsigned startup_delay;
unsigned enable_high:1;
unsigned is_enabled:1;
bool enable_high;
bool is_enabled;
};

static int fixed_voltage_is_enabled(struct regulator_dev *dev)
Expand All @@ -49,7 +49,7 @@ static int fixed_voltage_enable(struct regulator_dev *dev)

if (gpio_is_valid(data->gpio)) {
gpio_set_value_cansleep(data->gpio, data->enable_high);
data->is_enabled = 1;
data->is_enabled = true;
}

return 0;
Expand All @@ -61,7 +61,7 @@ static int fixed_voltage_disable(struct regulator_dev *dev)

if (gpio_is_valid(data->gpio)) {
gpio_set_value_cansleep(data->gpio, !data->enable_high);
data->is_enabled = 0;
data->is_enabled = false;
}

return 0;
Expand Down Expand Up @@ -101,7 +101,7 @@ static struct regulator_ops fixed_voltage_ops = {
.list_voltage = fixed_voltage_list_voltage,
};

static int regulator_fixed_voltage_probe(struct platform_device *pdev)
static int __devinit reg_fixed_voltage_probe(struct platform_device *pdev)
{
struct fixed_voltage_config *config = pdev->dev.platform_data;
struct fixed_voltage_data *drvdata;
Expand Down Expand Up @@ -174,7 +174,7 @@ static int regulator_fixed_voltage_probe(struct platform_device *pdev)
/* Regulator without GPIO control is considered
* always enabled
*/
drvdata->is_enabled = 1;
drvdata->is_enabled = true;
}

drvdata->dev = regulator_register(&drvdata->desc, &pdev->dev,
Expand Down Expand Up @@ -202,7 +202,7 @@ static int regulator_fixed_voltage_probe(struct platform_device *pdev)
return ret;
}

static int regulator_fixed_voltage_remove(struct platform_device *pdev)
static int __devexit reg_fixed_voltage_remove(struct platform_device *pdev)
{
struct fixed_voltage_data *drvdata = platform_get_drvdata(pdev);

Expand All @@ -216,10 +216,11 @@ static int regulator_fixed_voltage_remove(struct platform_device *pdev)
}

static struct platform_driver regulator_fixed_voltage_driver = {
.probe = regulator_fixed_voltage_probe,
.remove = regulator_fixed_voltage_remove,
.probe = reg_fixed_voltage_probe,
.remove = __devexit_p(reg_fixed_voltage_remove),
.driver = {
.name = "reg-fixed-voltage",
.owner = THIS_MODULE,
},
};

Expand Down

0 comments on commit bf65a88

Please sign in to comment.