aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/88pm860x-codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/88pm860x-codec.c')
-rw-r--r--sound/soc/codecs/88pm860x-codec.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c
index 60159c07448d..8af04343cc1a 100644
--- a/sound/soc/codecs/88pm860x-codec.c
+++ b/sound/soc/codecs/88pm860x-codec.c
@@ -120,10 +120,8 @@
120 * before DAC & PGA in DAPM power-off sequence. 120 * before DAC & PGA in DAPM power-off sequence.
121 */ 121 */
122#define PM860X_DAPM_OUTPUT(wname, wevent) \ 122#define PM860X_DAPM_OUTPUT(wname, wevent) \
123{ .id = snd_soc_dapm_pga, .name = wname, .reg = SND_SOC_NOPM, \ 123 SND_SOC_DAPM_PGA_E(wname, SND_SOC_NOPM, 0, 0, NULL, 0, wevent, \
124 .shift = 0, .invert = 0, .kcontrol_news = NULL, \ 124 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD)
125 .num_kcontrols = 0, .event = wevent, \
126 .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD, }
127 125
128struct pm860x_det { 126struct pm860x_det {
129 struct snd_soc_jack *hp_jack; 127 struct snd_soc_jack *hp_jack;
@@ -1444,7 +1442,7 @@ static int pm860x_codec_probe(struct platform_device *pdev)
1444 res = platform_get_resource(pdev, IORESOURCE_IRQ, i); 1442 res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
1445 if (!res) { 1443 if (!res) {
1446 dev_err(&pdev->dev, "Failed to get IRQ resources\n"); 1444 dev_err(&pdev->dev, "Failed to get IRQ resources\n");
1447 goto out; 1445 return -EINVAL;
1448 } 1446 }
1449 pm860x->irq[i] = res->start + chip->irq_base; 1447 pm860x->irq[i] = res->start + chip->irq_base;
1450 strncpy(pm860x->name[i], res->name, MAX_NAME_LEN); 1448 strncpy(pm860x->name[i], res->name, MAX_NAME_LEN);
@@ -1454,19 +1452,14 @@ static int pm860x_codec_probe(struct platform_device *pdev)
1454 pm860x_dai, ARRAY_SIZE(pm860x_dai)); 1452 pm860x_dai, ARRAY_SIZE(pm860x_dai));
1455 if (ret) { 1453 if (ret) {
1456 dev_err(&pdev->dev, "Failed to register codec\n"); 1454 dev_err(&pdev->dev, "Failed to register codec\n");
1457 goto out; 1455 return -EINVAL;
1458 } 1456 }
1459 return ret; 1457 return ret;
1460
1461out:
1462 platform_set_drvdata(pdev, NULL);
1463 return -EINVAL;
1464} 1458}
1465 1459
1466static int pm860x_codec_remove(struct platform_device *pdev) 1460static int pm860x_codec_remove(struct platform_device *pdev)
1467{ 1461{
1468 snd_soc_unregister_codec(&pdev->dev); 1462 snd_soc_unregister_codec(&pdev->dev);
1469 platform_set_drvdata(pdev, NULL);
1470 return 0; 1463 return 0;
1471} 1464}
1472 1465