Merge branch 'for-3.2' into for-3.3
[deliverable/linux.git] / sound / soc / codecs / wm9081.c
index 48bf80baf1d4d22618751bb3838927b4c689f2b8..a6bab392700e94bfe138e8ae2322f1df47d3a70d 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/device.h>
 #include <linux/pm.h>
 #include <linux/i2c.h>
-#include <linux/platform_device.h>
 #include <linux/regmap.h>
 #include <linux/slab.h>
 #include <sound/core.h>
@@ -32,7 +31,6 @@
 #include "wm9081.h"
 
 static struct reg_default wm9081_reg[] = {
-       {  0, 0x9081 },     /* R0  - Software Reset */
        {  2, 0x00B9 },     /* R2  - Analogue Lineout */
        {  3, 0x00B9 },     /* R3  - Analogue Speaker PGA */
        {  4, 0x0001 },     /* R4  - VMID Control */
@@ -1303,7 +1301,7 @@ static int wm9081_remove(struct snd_soc_codec *codec)
 }
 
 #ifdef CONFIG_PM
-static int wm9081_suspend(struct snd_soc_codec *codec, pm_message_t state)
+static int wm9081_suspend(struct snd_soc_codec *codec)
 {
        wm9081_set_bias_level(codec, SND_SOC_BIAS_OFF);
 
@@ -1362,7 +1360,8 @@ static __devinit int wm9081_i2c_probe(struct i2c_client *i2c,
        unsigned int reg;
        int ret;
 
-       wm9081 = kzalloc(sizeof(struct wm9081_priv), GFP_KERNEL);
+       wm9081 = devm_kzalloc(&i2c->dev, sizeof(struct wm9081_priv),
+                             GFP_KERNEL);
        if (wm9081 == NULL)
                return -ENOMEM;
 
@@ -1406,7 +1405,6 @@ static __devinit int wm9081_i2c_probe(struct i2c_client *i2c,
 err_regmap:
        regmap_exit(wm9081->regmap);
 err:
-       kfree(wm9081);
 
        return ret;
 }
@@ -1417,7 +1415,6 @@ static __devexit int wm9081_i2c_remove(struct i2c_client *client)
 
        snd_soc_unregister_codec(&client->dev);
        regmap_exit(wm9081->regmap);
-       kfree(i2c_get_clientdata(client));
        return 0;
 }
 
This page took 0.027744 seconds and 5 git commands to generate.