forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/sound/soc/au1x/psc-ac97.c
....@@ -1,15 +1,11 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Au12x0/Au1550 PSC ALSA ASoC audio support.
34 *
45 * (c) 2007-2009 MSC Vertriebsges.m.b.H.,
56 * Manuel Lauss <manuel.lauss@gmail.com>
67 *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
10
- *
118 * Au1xxx-PSC AC97 glue.
12
- *
139 */
1410
1511 #include <linux/init.h>
....@@ -62,7 +58,7 @@
6258 static inline struct au1xpsc_audio_data *ac97_to_pscdata(struct snd_ac97 *x)
6359 {
6460 struct snd_soc_card *c = x->bus->card->private_data;
65
- return snd_soc_dai_get_drvdata(c->rtd->cpu_dai);
61
+ return snd_soc_dai_get_drvdata(c->asoc_rtd_to_cpu(rtd, 0));
6662 }
6763
6864 #else
....@@ -343,7 +339,6 @@
343339 };
344340
345341 static const struct snd_soc_dai_driver au1xpsc_ac97_dai_template = {
346
- .bus_control = true,
347342 .probe = au1xpsc_ac97_probe,
348343 .playback = {
349344 .rates = AC97_RATES,
....@@ -367,7 +362,7 @@
367362 static int au1xpsc_ac97_drvprobe(struct platform_device *pdev)
368363 {
369364 int ret;
370
- struct resource *iores, *dmares;
365
+ struct resource *dmares;
371366 unsigned long sel;
372367 struct au1xpsc_audio_data *wd;
373368
....@@ -378,8 +373,7 @@
378373
379374 mutex_init(&wd->lock);
380375
381
- iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
382
- wd->mmio = devm_ioremap_resource(&pdev->dev, iores);
376
+ wd->mmio = devm_platform_ioremap_resource(pdev, 0);
383377 if (IS_ERR(wd->mmio))
384378 return PTR_ERR(wd->mmio);
385379