diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-12-01 09:55:07 +0800 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-01-09 00:37:38 +0100 |
commit | b04edb934966b824b5d61edab76f257c10e31299 (patch) | |
tree | 38ab6c9d65b5d3284783c48f88c3128fde9ab410 /drivers/mfd/twl6040-core.c | |
parent | 4e9daaca8d265151789c78a695ffdc774d2af850 (diff) | |
download | lwn-b04edb934966b824b5d61edab76f257c10e31299.tar.gz lwn-b04edb934966b824b5d61edab76f257c10e31299.zip |
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 7f06685187f4..dda86293dc9f 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 */ |