diff options
author | Alexander Sverdlin <subaparts@yandex.ru> | 2011-02-03 03:11:45 +0300 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-02-08 14:26:14 +0300 |
commit | a98a0bc6c92eacd181417a9c0ccd2e8028066622 (patch) | |
tree | 188923b6709275cce94a4a2c70f1081e94e2f8a9 /sound/soc/codecs/cs4271.c | |
parent | 338ee25393a5627e8ded5819147f98b919656ce9 (diff) | |
download | linux-a98a0bc6c92eacd181417a9c0ccd2e8028066622.tar.xz |
ASoC: CS4271: Move Chip Select control out of the CODEC code.
Move Chip Select control out of the CODEC code for CS4271.
Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/cs4271.c')
-rw-r--r-- | sound/soc/codecs/cs4271.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c index 9c5b7db0ce6a..1791796216c8 100644 --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c @@ -441,22 +441,11 @@ static int cs4271_probe(struct snd_soc_codec *codec) struct cs4271_platform_data *cs4271plat = codec->dev->platform_data; int ret; int gpio_nreset = -EINVAL; - int gpio_disable = -EINVAL; codec->control_data = cs4271->control_data; - if (cs4271plat) { - if (gpio_is_valid(cs4271plat->gpio_nreset)) - gpio_nreset = cs4271plat->gpio_nreset; - if (gpio_is_valid(cs4271plat->gpio_disable)) - gpio_disable = cs4271plat->gpio_disable; - } - - if (gpio_disable >= 0) - if (gpio_request(gpio_disable, "CS4271 Disable")) - gpio_disable = -EINVAL; - if (gpio_disable >= 0) - gpio_direction_output(gpio_disable, 0); + if (cs4271plat && gpio_is_valid(cs4271plat->gpio_nreset)) + gpio_nreset = cs4271plat->gpio_nreset; if (gpio_nreset >= 0) if (gpio_request(gpio_nreset, "CS4271 Reset")) @@ -471,7 +460,6 @@ static int cs4271_probe(struct snd_soc_codec *codec) } cs4271->gpio_nreset = gpio_nreset; - cs4271->gpio_disable = gpio_disable; /* * In case of I2C, chip address specified in board data. @@ -509,10 +497,9 @@ 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_disable; + int gpio_nreset; gpio_nreset = cs4271->gpio_nreset; - gpio_disable = cs4271->gpio_disable; if (gpio_is_valid(gpio_nreset)) { /* Set codec to the reset state */ @@ -520,9 +507,6 @@ static int cs4271_remove(struct snd_soc_codec *codec) gpio_free(gpio_nreset); } - if (gpio_is_valid(gpio_disable)) - gpio_free(gpio_disable); - return 0; }; |