diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-11-25 14:29:40 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-25 14:37:01 -0500 |
commit | 69b93607a9862b1db2f0f2e078e1396f8e20fa9b (patch) | |
tree | 5db0ff8c37996fea0f74df6d5a25514db2a2a3f9 /sound/soc/jz4740 | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) |
ASoC: qi_lb60: Pass flags to gpiod_get()
Pass flags to gpiod_get() to automatically configure the GPIOs. This is shorter
and not passing any flags to gpiod_get() will eventually no longer be supported.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/jz4740')
-rw-r--r-- | sound/soc/jz4740/qi_lb60.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sound/soc/jz4740/qi_lb60.c b/sound/soc/jz4740/qi_lb60.c index 5cb91f9e8626..0fb7d2a91c3a 100644 --- a/sound/soc/jz4740/qi_lb60.c +++ b/sound/soc/jz4740/qi_lb60.c | |||
@@ -77,25 +77,18 @@ static int qi_lb60_probe(struct platform_device *pdev) | |||
77 | { | 77 | { |
78 | struct qi_lb60 *qi_lb60; | 78 | struct qi_lb60 *qi_lb60; |
79 | struct snd_soc_card *card = &qi_lb60_card; | 79 | struct snd_soc_card *card = &qi_lb60_card; |
80 | int ret; | ||
81 | 80 | ||
82 | qi_lb60 = devm_kzalloc(&pdev->dev, sizeof(*qi_lb60), GFP_KERNEL); | 81 | qi_lb60 = devm_kzalloc(&pdev->dev, sizeof(*qi_lb60), GFP_KERNEL); |
83 | if (!qi_lb60) | 82 | if (!qi_lb60) |
84 | return -ENOMEM; | 83 | return -ENOMEM; |
85 | 84 | ||
86 | qi_lb60->snd_gpio = devm_gpiod_get(&pdev->dev, "snd"); | 85 | qi_lb60->snd_gpio = devm_gpiod_get(&pdev->dev, "snd", GPIOD_OUT_LOW); |
87 | if (IS_ERR(qi_lb60->snd_gpio)) | 86 | if (IS_ERR(qi_lb60->snd_gpio)) |
88 | return PTR_ERR(qi_lb60->snd_gpio); | 87 | return PTR_ERR(qi_lb60->snd_gpio); |
89 | ret = gpiod_direction_output(qi_lb60->snd_gpio, 0); | ||
90 | if (ret) | ||
91 | return ret; | ||
92 | 88 | ||
93 | qi_lb60->amp_gpio = devm_gpiod_get(&pdev->dev, "amp"); | 89 | qi_lb60->amp_gpio = devm_gpiod_get(&pdev->dev, "amp", GPIOD_OUT_LOW); |
94 | if (IS_ERR(qi_lb60->amp_gpio)) | 90 | if (IS_ERR(qi_lb60->amp_gpio)) |
95 | return PTR_ERR(qi_lb60->amp_gpio); | 91 | return PTR_ERR(qi_lb60->amp_gpio); |
96 | ret = gpiod_direction_output(qi_lb60->amp_gpio, 0); | ||
97 | if (ret) | ||
98 | return ret; | ||
99 | 92 | ||
100 | card->dev = &pdev->dev; | 93 | card->dev = &pdev->dev; |
101 | 94 | ||