]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/blobdiff - sound/soc/codecs/wm8400.c
Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
[can-eth-gw-linux.git] / sound / soc / codecs / wm8400.c
index 5d277a915f8180a4a5b4bc301ecad54d7b7c6b9f..af6d227e67be02f72da11eaefa12a97d2fcd8c80 100644 (file)
@@ -1373,7 +1373,7 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec)
        codec->control_data = priv->wm8400 = wm8400;
        priv->codec = codec;
 
-       ret = regulator_bulk_get(wm8400->dev,
+       ret = devm_regulator_bulk_get(wm8400->dev,
                                 ARRAY_SIZE(power), &power[0]);
        if (ret != 0) {
                dev_err(codec->dev, "Failed to get regulators: %d\n", ret);
@@ -1398,15 +1398,9 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec)
        snd_soc_write(codec, WM8400_LEFT_OUTPUT_VOLUME, 0x50 | (1<<8));
        snd_soc_write(codec, WM8400_RIGHT_OUTPUT_VOLUME, 0x50 | (1<<8));
 
-       if (!schedule_work(&priv->work)) {
-               ret = -EINVAL;
-               goto err_regulator;
-       }
+       if (!schedule_work(&priv->work))
+               return -EINVAL;
        return 0;
-
-err_regulator:
-       regulator_bulk_free(ARRAY_SIZE(power), power);
-       return ret;
 }
 
 static int  wm8400_codec_remove(struct snd_soc_codec *codec)
@@ -1417,8 +1411,6 @@ static int  wm8400_codec_remove(struct snd_soc_codec *codec)
        snd_soc_write(codec, WM8400_POWER_MANAGEMENT_1,
                     reg & (~WM8400_CODEC_ENA));
 
-       regulator_bulk_free(ARRAY_SIZE(power), power);
-
        return 0;
 }
 
@@ -1439,13 +1431,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8400 = {
        .num_dapm_routes = ARRAY_SIZE(wm8400_dapm_routes),
 };
 
-static int __devinit wm8400_probe(struct platform_device *pdev)
+static int wm8400_probe(struct platform_device *pdev)
 {
        return snd_soc_register_codec(&pdev->dev, &soc_codec_dev_wm8400,
                        &wm8400_dai, 1);
 }
 
-static int __devexit wm8400_remove(struct platform_device *pdev)
+static int wm8400_remove(struct platform_device *pdev)
 {
        snd_soc_unregister_codec(&pdev->dev);
        return 0;
@@ -1457,7 +1449,7 @@ static struct platform_driver wm8400_codec_driver = {
                   .owner = THIS_MODULE,
                   },
        .probe = wm8400_probe,
-       .remove = __devexit_p(wm8400_remove),
+       .remove = wm8400_remove,
 };
 
 module_platform_driver(wm8400_codec_driver);