ASoC: h1940_uda1380: Don't modify runtime->hw
[firefly-linux-kernel-4.4.55.git] / sound / soc / samsung / h1940_uda1380.c
index fa91376e323dc471c790ab80513448983645be99..88b09e022503d94f6774dcfbc2822a2e054a0800 100644 (file)
@@ -23,6 +23,7 @@
 #include "regs-iis.h"
 #include <asm/mach-types.h>
 
+#include <mach/gpio-samsung.h>
 #include "s3c24xx-i2s.h"
 
 static unsigned int rates[] = {
@@ -65,10 +66,6 @@ static int h1940_startup(struct snd_pcm_substream *substream)
 {
        struct snd_pcm_runtime *runtime = substream->runtime;
 
-       runtime->hw.rate_min = hw_rates.list[0];
-       runtime->hw.rate_max = hw_rates.list[hw_rates.count - 1];
-       runtime->hw.rates = SNDRV_PCM_RATE_KNOT;
-
        return snd_pcm_hw_constraint_list(runtime, 0,
                                        SNDRV_PCM_HW_PARAM_RATE,
                                        &hw_rates);
@@ -93,7 +90,7 @@ static int h1940_hw_params(struct snd_pcm_substream *substream,
                        div++;
                break;
        default:
-               dev_err(&rtd->dev, "%s: rate %d is not supported\n",
+               dev_err(rtd->dev, "%s: rate %d is not supported\n",
                        __func__, rate);
                return -EINVAL;
        }
@@ -180,7 +177,6 @@ static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_soc_codec *codec = rtd->codec;
        struct snd_soc_dapm_context *dapm = &codec->dapm;
-       int err;
 
        snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
        snd_soc_dapm_enable_pin(dapm, "Speaker");