summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/aat2870-core.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-12-01 09:47:54 +0800
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-09 00:37:37 +0100
commitaced760d91ea20ee55d9ba90fff44764a2c2c535 (patch)
tree097c35fd656667a381433bbb4d23723cd330843b /drivers/mfd/aat2870-core.c
parent61485c63c4a4e823445da4ae8798d9082f6bc586 (diff)
downloadlinux-aced760d91ea20ee55d9ba90fff44764a2c2c535.tar.bz2
mfd: Use gpio_request_one from aat2870-core
Use gpio_request_one() instead of multiple gpiolib calls. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Jin Park <jinyoungp@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/aat2870-core.c')
-rw-r--r--drivers/mfd/aat2870-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/aat2870-core.c b/drivers/mfd/aat2870-core.c
index 02c42015ba51..762061712db6 100644
--- a/drivers/mfd/aat2870-core.c
+++ b/drivers/mfd/aat2870-core.c
@@ -407,13 +407,13 @@ static int aat2870_i2c_probe(struct i2c_client *client,
aat2870->init(aat2870);
if (aat2870->en_pin >= 0) {
- ret = gpio_request(aat2870->en_pin, "aat2870-en");
+ ret = gpio_request_one(aat2870->en_pin, GPIOF_OUT_INIT_HIGH,
+ "aat2870-en");
if (ret < 0) {
dev_err(&client->dev,
"Failed to request GPIO %d\n", aat2870->en_pin);
goto out_kfree;
}
- gpio_direction_output(aat2870->en_pin, 1);
}
aat2870_enable(aat2870);