提交 aced760d 编写于 作者: A Axel Lin 提交者: Samuel Ortiz

mfd: Use gpio_request_one from aat2870-core

Use gpio_request_one() instead of multiple gpiolib calls.
Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Acked-by: NJin Park <jinyoungp@nvidia.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 61485c63
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册