projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c95666
)
ASoC: rt5665: Use devm_gpio_request_one()
author
Axel Lin
<axel.lin@ingics.com>
Wed, 16 Nov 2016 13:08:42 +0000
(21:08 +0800)
committer
Mark Brown
<broonie@kernel.org>
Wed, 16 Nov 2016 16:27:29 +0000
(16:27 +0000)
Simplify the code a bit.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5665.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/rt5665.c
b/sound/soc/codecs/rt5665.c
index 7dfaaf1c2d140b1d20b296b26a76c19c067b66cd..324461e985b3918211ad29052a5142a6560e26af 100644
(file)
--- a/
sound/soc/codecs/rt5665.c
+++ b/
sound/soc/codecs/rt5665.c
@@
-4677,11
+4677,9
@@
static int rt5665_i2c_probe(struct i2c_client *i2c,
}
if (gpio_is_valid(rt5665->pdata.ldo1_en)) {
- if (devm_gpio_request(&i2c->dev, rt5665->pdata.ldo1_en,
- "rt5665"))
+ if (devm_gpio_request
_one
(&i2c->dev, rt5665->pdata.ldo1_en,
+
GPIOF_OUT_INIT_HIGH,
"rt5665"))
dev_err(&i2c->dev, "Fail gpio_request gpio_ldo\n");
- else if (gpio_direction_output(rt5665->pdata.ldo1_en, 1))
- dev_err(&i2c->dev, "Fail gpio_direction gpio_ldo\n");
}
/* Sleep for 300 ms miniumum */