Skip to content

Commit

Permalink
mfd: Use gpio_request_one from twl6040-core
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Samuel Ortiz committed Jan 8, 2012
1 parent 4e9daac commit b04edb9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/mfd/twl6040-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit b04edb9

Please sign in to comment.