summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/cs4271.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-11-25 21:34:34 -0800
committerOlof Johansson <olof@lixom.net>2012-11-25 21:34:34 -0800
commit0f9cb211ba5db93d488fe6b154138231fdd0e22d (patch)
tree293871b042e9ebc49b1d783f1b110eef541ddc97 /sound/soc/codecs/cs4271.c
parent007108a2279123ad6639b6c653ad1a731febb60f (diff)
parent9489e9dcae718d5fde988e4a684a0f55b5f94d17 (diff)
downloadlinux-3.10-0f9cb211ba5db93d488fe6b154138231fdd0e22d.tar.gz
linux-3.10-0f9cb211ba5db93d488fe6b154138231fdd0e22d.tar.bz2
linux-3.10-0f9cb211ba5db93d488fe6b154138231fdd0e22d.zip
Merge tag 'v3.7-rc7' into next/cleanup
Merging in mainline back to next/cleanup since it has collected a few conflicts between fixes going upstream and some of the cleanup patches. Git doesn't auto-resolve some of them, and they're mostly noise so let's take care of it locally. Conflicts are in: arch/arm/mach-omap2/omap_hwmod_44xx_data.c arch/arm/plat-omap/i2c.c drivers/video/omap2/dss/dss.c Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'sound/soc/codecs/cs4271.c')
-rw-r--r--sound/soc/codecs/cs4271.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
index f994af34f55..e3f0a7f3131 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;
};