diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-11-21 07:18:11 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-11-21 07:18:11 +0100 |
commit | 789e05275e90b637f2029375715e187fd8cabbf4 (patch) | |
tree | ac6f9626a60e81c8af28b11f67e09bde9e145f24 /sound/soc/codecs/cs4271.c | |
parent | 2ea3c6a2c779e5a6487d2b436770232162dfbbe3 (diff) | |
parent | a6366c519cead55ce537babce2271e3b2a1ccec9 (diff) |
Merge tag 'asoc-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.7
The biggest batch of fixes here is the Kirkwood DMA fixes, plus a couple
of other small fixes.
Diffstat (limited to 'sound/soc/codecs/cs4271.c')
-rw-r--r-- | sound/soc/codecs/cs4271.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c index f994af34f552..e3f0a7f3131e 100644 --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c @@ -485,7 +485,7 @@ static int cs4271_probe(struct snd_soc_codec *codec) gpio_nreset = cs4271plat->gpio_nreset; if (gpio_nreset >= 0) - if (gpio_request(gpio_nreset, "CS4271 Reset")) + if (devm_gpio_request(codec->dev, gpio_nreset, "CS4271 Reset")) gpio_nreset = -EINVAL; if (gpio_nreset >= 0) { /* Reset codec */ @@ -535,15 +535,10 @@ static int cs4271_probe(struct snd_soc_codec *codec) static int cs4271_remove(struct snd_soc_codec *codec) { struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec); - int gpio_nreset; - gpio_nreset = cs4271->gpio_nreset; - - if (gpio_is_valid(gpio_nreset)) { + if (gpio_is_valid(cs4271->gpio_nreset)) /* Set codec to the reset state */ - gpio_set_value(gpio_nreset, 0); - gpio_free(gpio_nreset); - } + gpio_set_value(cs4271->gpio_nreset, 0); return 0; }; |