]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branch 'for-2.6.39' into for-2.6.40
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 11 Apr 2011 20:29:24 +0000 (13:29 -0700)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 11 Apr 2011 20:29:24 +0000 (13:29 -0700)
1  2 
sound/soc/codecs/sn95031.c
sound/soc/mid-x86/sst_platform.c

index 569555f4a92f330595c017eda0ffc2112f4fa2e1,f74d497ce9fca87d5e5d34368c55ca270f84edfa..f70977d7dbe61722a86a8de6478898d4b766ebba
@@@ -825,6 -825,8 +825,6 @@@ EXPORT_SYMBOL_GPL(sn95031_jack_detectio
  /* codec registration */
  static int sn95031_codec_probe(struct snd_soc_codec *codec)
  {
 -      int ret;
 -
        pr_debug("codec_probe called\n");
  
        codec->dapm.bias_level = SND_SOC_BIAS_OFF;
        snd_soc_add_controls(codec, sn95031_snd_controls,
                             ARRAY_SIZE(sn95031_snd_controls));
  
 -      ret = snd_soc_dapm_new_controls(&codec->dapm, sn95031_dapm_widgets,
 -                              ARRAY_SIZE(sn95031_dapm_widgets));
 -      if (ret)
 -              pr_err("soc_dapm_new_control failed %d", ret);
 -      ret = snd_soc_dapm_add_routes(&codec->dapm, sn95031_audio_map,
 -                              ARRAY_SIZE(sn95031_audio_map));
 -      if (ret)
 -              pr_err("soc_dapm_add_routes failed %d", ret);
 -
 -      return ret;
 +      return 0;
  }
  
  static int sn95031_codec_remove(struct snd_soc_codec *codec)
@@@ -892,10 -903,6 +892,10 @@@ struct snd_soc_codec_driver sn95031_cod
        .read           = sn95031_read,
        .write          = sn95031_write,
        .set_bias_level = sn95031_set_vaud_bias,
 +      .dapm_widgets   = sn95031_dapm_widgets,
 +      .num_dapm_widgets       = ARRAY_SIZE(sn95031_dapm_widgets),
 +      .dapm_routes    = sn95031_audio_map,
 +      .num_dapm_routes        = ARRAY_SIZE(sn95031_audio_map),
  };
  
  static int __devinit sn95031_device_probe(struct platform_device *pdev)
@@@ -918,7 -925,7 +918,7 @@@ static struct platform_driver sn95031_c
                .owner          = THIS_MODULE,
        },
        .probe          = sn95031_device_probe,
-       .remove         = sn95031_device_remove,
+       .remove         = __devexit_p(sn95031_device_remove),
  };
  
  static int __init sn95031_init(void)
index 9ba941447d41e278b69eeeba0de5da7b2e546d7b,9ebe027f69e720ef13ffe11ce186a15889a1b16c..d827edb3d544b71af8c2f2028e87560ef0edccee
@@@ -116,18 -116,20 +116,20 @@@ struct snd_soc_dai_driver sst_platform_
  static inline void sst_set_stream_status(struct sst_runtime_stream *stream,
                                        int state)
  {
-       spin_lock(&stream->status_lock);
+       unsigned long flags;
+       spin_lock_irqsave(&stream->status_lock, flags);
        stream->stream_status = state;
-       spin_unlock(&stream->status_lock);
+       spin_unlock_irqrestore(&stream->status_lock, flags);
  }
  
  static inline int sst_get_stream_status(struct sst_runtime_stream *stream)
  {
        int state;
+       unsigned long flags;
  
-       spin_lock(&stream->status_lock);
+       spin_lock_irqsave(&stream->status_lock, flags);
        state = stream->stream_status;
-       spin_unlock(&stream->status_lock);
+       spin_unlock_irqrestore(&stream->status_lock, flags);
        return state;
  }
  
@@@ -247,13 -249,10 +249,13 @@@ static int sst_platform_open(struct snd
                return -ENOMEM;
        }
        stream->sstdrv_ops->vendor_id = MSIC_VENDOR_ID;
 +      stream->sstdrv_ops->module_name = SST_CARD_NAMES;
        /* registering with SST driver to get access to SST APIs to use */
        ret_val = register_sst_card(stream->sstdrv_ops);
        if (ret_val) {
                pr_err("sst: sst card registration failed\n");
 +              kfree(stream->sstdrv_ops);
 +              kfree(stream);
                return ret_val;
        }
        runtime->private_data = stream;
@@@ -271,7 -270,6 +273,7 @@@ static int sst_platform_close(struct sn
        str_id = stream->stream_info.str_id;
        if (str_id)
                ret_val = stream->sstdrv_ops->pcm_control->close(str_id);
 +      unregister_sst_card(stream->sstdrv_ops);
        kfree(stream->sstdrv_ops);
        kfree(stream);
        return ret_val;