diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-12-01 01:55:07 (GMT) |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-01-08 23:37:38 (GMT) |
commit | b04edb934966b824b5d61edab76f257c10e31299 (patch) | |
tree | 38ab6c9d65b5d3284783c48f88c3128fde9ab410 /drivers/mfd/twl6040-core.c | |
parent | 4e9daaca8d265151789c78a695ffdc774d2af850 (diff) | |
download | linux-b04edb934966b824b5d61edab76f257c10e31299.tar.xz |
mfd: Use gpio_request_one from twl6040-core
Use gpio_request_one() instead of multiple gpiolib calls.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/twl6040-core.c')
-rw-r--r-- | drivers/mfd/twl6040-core.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/mfd/twl6040-core.c b/drivers/mfd/twl6040-core.c index 7f06685..dda8629 100644 --- a/drivers/mfd/twl6040-core.c +++ b/drivers/mfd/twl6040-core.c @@ -509,13 +509,10 @@ static int __devinit twl6040_probe(struct platform_device *pdev) twl6040->audpwron = -EINVAL; if (gpio_is_valid(twl6040->audpwron)) { - ret = gpio_request(twl6040->audpwron, "audpwron"); + ret = gpio_request_one(twl6040->audpwron, GPIOF_OUT_INIT_LOW, + "audpwron"); if (ret) goto gpio1_err; - - ret = gpio_direction_output(twl6040->audpwron, 0); - if (ret) - goto gpio2_err; } /* codec interrupt */ |