]> err.no Git - linux-2.6/blobdiff - sound/soc/codecs/wm8750.c
[POWERPC] spufs: lockdep annotations for spufs_dir_close
[linux-2.6] / sound / soc / codecs / wm8750.c
index 7073e8e294fc5fdfdf5f0c6ea97f8811e98bcd99..16cd5d4d5ad97108443d6bc1e51db727c282b5d4 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/pm.h>
 #include <linux/i2c.h>
 #include <linux/platform_device.h>
-#include <sound/driver.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
@@ -111,7 +110,7 @@ static int wm8750_write(struct snd_soc_codec *codec, unsigned int reg,
        data[0] = (reg << 1) | ((value >> 8) & 0x0001);
        data[1] = value & 0x00ff;
 
-       wm8750_write_reg_cache (codec, reg, value);
+       wm8750_write_reg_cache(codec, reg, value);
        if (codec->hw_write(codec->control_data, data, 2) == 2)
                return 0;
        else
@@ -189,7 +188,7 @@ SOC_ENUM("Bass Boost", wm8750_enum[0]),
 SOC_ENUM("Bass Filter", wm8750_enum[1]),
 SOC_SINGLE("Bass Volume", WM8750_BASS, 0, 15, 1),
 
-SOC_SINGLE("Treble Volume", WM8750_TREBLE, 0, 15, 0),
+SOC_SINGLE("Treble Volume", WM8750_TREBLE, 0, 15, 1),
 SOC_ENUM("Treble Cut-off", wm8750_enum[2]),
 
 SOC_SINGLE("3D Switch", WM8750_3D, 0, 1, 0),
@@ -258,7 +257,8 @@ static int wm8750_add_controls(struct snd_soc_codec *codec)
 
        for (i = 0; i < ARRAY_SIZE(wm8750_snd_controls); i++) {
                err = snd_ctl_add(codec->card,
-                               snd_soc_cnew(&wm8750_snd_controls[i],codec, NULL));
+                               snd_soc_cnew(&wm8750_snd_controls[i],
+                                               codec, NULL));
                if (err < 0)
                        return err;
        }
@@ -479,15 +479,13 @@ static int wm8750_add_widgets(struct snd_soc_codec *codec)
 {
        int i;
 
-       for(i = 0; i < ARRAY_SIZE(wm8750_dapm_widgets); i++) {
+       for (i = 0; i < ARRAY_SIZE(wm8750_dapm_widgets); i++)
                snd_soc_dapm_new_control(codec, &wm8750_dapm_widgets[i]);
-       }
 
        /* set up audio path audio_mapnects */
-       for(i = 0; audio_map[i][0] != NULL; i++) {
+       for (i = 0; audio_map[i][0] != NULL; i++)
                snd_soc_dapm_connect_input(codec, audio_map[i][0],
                        audio_map[i][1], audio_map[i][2]);
-       }
 
        snd_soc_dapm_new_widgets(codec);
        return 0;
@@ -715,8 +713,8 @@ static int wm8750_dapm_event(struct snd_soc_codec *codec, int event)
 }
 
 #define WM8750_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
-               SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \
-               SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000)
+       SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | \
+       SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000)
 
 #define WM8750_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
        SNDRV_PCM_FMTBIT_S24_LE)
@@ -785,7 +783,8 @@ static int wm8750_resume(struct platform_device *pdev)
        if (codec->suspend_dapm_state == SNDRV_CTL_POWER_D0) {
                wm8750_dapm_event(codec, SNDRV_CTL_POWER_D2);
                codec->dapm_state = SNDRV_CTL_POWER_D0;
-               schedule_delayed_work(&codec->delayed_work, msecs_to_jiffies(1000));
+               schedule_delayed_work(&codec->delayed_work,
+                                       msecs_to_jiffies(1000));
        }
 
        return 0;
@@ -808,7 +807,7 @@ static int wm8750_init(struct snd_soc_device *socdev)
        codec->dai = &wm8750_dai;
        codec->num_dai = 1;
        codec->reg_cache_size = sizeof(wm8750_reg);
-       codec->reg_cache = kmemdup(wm8750_reg, sizeof(wm8750_reg), GFP_KRENEL);
+       codec->reg_cache = kmemdup(wm8750_reg, sizeof(wm8750_reg), GFP_KERNEL);
        if (codec->reg_cache == NULL)
                return -ENOMEM;
 
@@ -865,7 +864,7 @@ pcm_err:
    around */
 static struct snd_soc_device *wm8750_socdev;
 
-#if defined (CONFIG_I2C) || defined (CONFIG_I2C_MODULE)
+#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
 
 /*
  * WM8731 2 wire address is determined by GPIO5
@@ -980,8 +979,8 @@ static int wm8750_probe(struct platform_device *pdev)
        INIT_LIST_HEAD(&codec->dapm_paths);
        wm8750_socdev = socdev;
        INIT_DELAYED_WORK(&codec->delayed_work, wm8750_work);
-       
-#if defined (CONFIG_I2C) || defined (CONFIG_I2C_MODULE)
+
+#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
        if (setup->i2c_address) {
                normal_i2c[0] = setup->i2c_address;
                codec->hw_write = (hw_write_t)i2c_master_send;
@@ -1026,7 +1025,7 @@ static int wm8750_remove(struct platform_device *pdev)
        run_delayed_work(&codec->delayed_work);
        snd_soc_free_pcms(socdev);
        snd_soc_dapm_free(socdev);
-#if defined (CONFIG_I2C) || defined (CONFIG_I2C_MODULE)
+#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
        i2c_del_driver(&wm8750_i2c_driver);
 #endif
        kfree(codec->private_data);
@@ -1041,7 +1040,6 @@ struct snd_soc_codec_device soc_codec_dev_wm8750 = {
        .suspend =      wm8750_suspend,
        .resume =       wm8750_resume,
 };
-
 EXPORT_SYMBOL_GPL(soc_codec_dev_wm8750);
 
 MODULE_DESCRIPTION("ASoC WM8750 driver");