aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8400.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-13 14:51:23 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-13 14:51:23 -0500
commit046e7d685bc370fd4c879ab6635ad3f69e6673d1 (patch)
tree36b981f8d1f2bfd348c1479acbe3a9426d35c377 /sound/soc/codecs/wm8400.c
parentfe504c5c745aeb767d978fbedeb94775fd4cb69c (diff)
parent6eb827d23577a4efec2b10a9c4cc9ded268a1d1c (diff)
Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai: "This update contains a fairly wide range of changes all over in sound subdirectory, mainly because of UAPI header moves by David and __dev* annotation removals by Bill. Other highlights are: - Introduced the support for wallclock timestamps in ALSA PCM core - Add the poll loop implementation for HD-audio jack detection - Yet more VGA-switcheroo fixes for HD-audio - New VIA HD-audio codec support - More fixes on resource management in USB audio and MIDI drivers - More quirks for USB-audio ASUS Xonar U3, Reloop Play, Focusrite, Roland VG-99, etc - Add support for FastTrack C400 usb-audio - Clean ups in many drivers regarding firmware loading - Add PSC724 Ultiimate Edge support to ice1712 - A few hdspm driver updates - New Stanton SCS.1d/1m FireWire driver - Standardisation of the logging in ASoC codes - DT and dmaengine support for ASoC Atmel - Support for Wolfson ADSP cores - New drivers for Freescale/iVeia P1022 and Maxim MAX98090 - Lots of other ASoC driver fixes and developments" Fix up trivial conflicts. And go out on a limb and assume the dts file 'status' field of one of the conflicting things was supposed to be "disabled", not "disable" like in pretty much all other cases. * tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (341 commits) ALSA: hda - Move runtime PM check to runtime_idle callback ALSA: hda - Add stereo-dmic fixup for Acer Aspire One 522 ALSA: hda - Avoid doubly suspend after vga switcheroo ALSA: usb-audio: Enable S/PDIF on the ASUS Xonar U3 ALSA: hda - Check validity of CORB/RIRB WP reads ALSA: hda - use usleep_range in link reset and change timeout check ALSA: HDA: VIA: Add support for codec VT1808. ALSA: HDA: VIA Add support for codec VT1705CF. ASoC: codecs: remove __dev* attributes ASoC: utils: remove __dev* attributes ASoC: ux500: remove __dev* attributes ASoC: txx9: remove __dev* attributes ASoC: tegra: remove __dev* attributes ASoC: spear: remove __dev* attributes ASoC: sh: remove __dev* attributes ASoC: s6000: remove __dev* attributes ASoC: OMAP: remove __dev* attributes ASoC: nuc900: remove __dev* attributes ASoC: mxs: remove __dev* attributes ASoC: kirkwood: remove __dev* attributes ...
Diffstat (limited to 'sound/soc/codecs/wm8400.c')
-rw-r--r--sound/soc/codecs/wm8400.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c
index 5d277a915f81..af6d227e67be 100644
--- a/sound/soc/codecs/wm8400.c
+++ b/sound/soc/codecs/wm8400.c
@@ -1373,7 +1373,7 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec)
1373 codec->control_data = priv->wm8400 = wm8400; 1373 codec->control_data = priv->wm8400 = wm8400;
1374 priv->codec = codec; 1374 priv->codec = codec;
1375 1375
1376 ret = regulator_bulk_get(wm8400->dev, 1376 ret = devm_regulator_bulk_get(wm8400->dev,
1377 ARRAY_SIZE(power), &power[0]); 1377 ARRAY_SIZE(power), &power[0]);
1378 if (ret != 0) { 1378 if (ret != 0) {
1379 dev_err(codec->dev, "Failed to get regulators: %d\n", ret); 1379 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)
1398 snd_soc_write(codec, WM8400_LEFT_OUTPUT_VOLUME, 0x50 | (1<<8)); 1398 snd_soc_write(codec, WM8400_LEFT_OUTPUT_VOLUME, 0x50 | (1<<8));
1399 snd_soc_write(codec, WM8400_RIGHT_OUTPUT_VOLUME, 0x50 | (1<<8)); 1399 snd_soc_write(codec, WM8400_RIGHT_OUTPUT_VOLUME, 0x50 | (1<<8));
1400 1400
1401 if (!schedule_work(&priv->work)) { 1401 if (!schedule_work(&priv->work))
1402 ret = -EINVAL; 1402 return -EINVAL;
1403 goto err_regulator;
1404 }
1405 return 0; 1403 return 0;
1406
1407err_regulator:
1408 regulator_bulk_free(ARRAY_SIZE(power), power);
1409 return ret;
1410} 1404}
1411 1405
1412static int wm8400_codec_remove(struct snd_soc_codec *codec) 1406static int wm8400_codec_remove(struct snd_soc_codec *codec)
@@ -1417,8 +1411,6 @@ static int wm8400_codec_remove(struct snd_soc_codec *codec)
1417 snd_soc_write(codec, WM8400_POWER_MANAGEMENT_1, 1411 snd_soc_write(codec, WM8400_POWER_MANAGEMENT_1,
1418 reg & (~WM8400_CODEC_ENA)); 1412 reg & (~WM8400_CODEC_ENA));
1419 1413
1420 regulator_bulk_free(ARRAY_SIZE(power), power);
1421
1422 return 0; 1414 return 0;
1423} 1415}
1424 1416
@@ -1439,13 +1431,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8400 = {
1439 .num_dapm_routes = ARRAY_SIZE(wm8400_dapm_routes), 1431 .num_dapm_routes = ARRAY_SIZE(wm8400_dapm_routes),
1440}; 1432};
1441 1433
1442static int __devinit wm8400_probe(struct platform_device *pdev) 1434static int wm8400_probe(struct platform_device *pdev)
1443{ 1435{
1444 return snd_soc_register_codec(&pdev->dev, &soc_codec_dev_wm8400, 1436 return snd_soc_register_codec(&pdev->dev, &soc_codec_dev_wm8400,
1445 &wm8400_dai, 1); 1437 &wm8400_dai, 1);
1446} 1438}
1447 1439
1448static int __devexit wm8400_remove(struct platform_device *pdev) 1440static int wm8400_remove(struct platform_device *pdev)
1449{ 1441{
1450 snd_soc_unregister_codec(&pdev->dev); 1442 snd_soc_unregister_codec(&pdev->dev);
1451 return 0; 1443 return 0;
@@ -1457,7 +1449,7 @@ static struct platform_driver wm8400_codec_driver = {
1457 .owner = THIS_MODULE, 1449 .owner = THIS_MODULE,
1458 }, 1450 },
1459 .probe = wm8400_probe, 1451 .probe = wm8400_probe,
1460 .remove = __devexit_p(wm8400_remove), 1452 .remove = wm8400_remove,
1461}; 1453};
1462 1454
1463module_platform_driver(wm8400_codec_driver); 1455module_platform_driver(wm8400_codec_driver);