forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/sound/soc/sti/sti_uniperif.c
....@@ -1,8 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) STMicroelectronics SA 2015
34 * Authors: Arnaud Pouliquen <arnaud.pouliquen@st.com>
45 * for STMicroelectronics.
5
- * License terms: GNU General Public License (GPL), version 2
66 */
77
88 #include <linux/module.h>
....@@ -308,9 +308,9 @@
308308 return 0;
309309 }
310310
311
-static int sti_uniperiph_dai_suspend(struct snd_soc_dai *dai)
311
+static int sti_uniperiph_suspend(struct snd_soc_component *component)
312312 {
313
- struct sti_uniperiph_data *priv = snd_soc_dai_get_drvdata(dai);
313
+ struct sti_uniperiph_data *priv = snd_soc_component_get_drvdata(component);
314314 struct uniperif *uni = priv->dai_data.uni;
315315 int ret;
316316
....@@ -330,9 +330,9 @@
330330 return ret;
331331 }
332332
333
-static int sti_uniperiph_dai_resume(struct snd_soc_dai *dai)
333
+static int sti_uniperiph_resume(struct snd_soc_component *component)
334334 {
335
- struct sti_uniperiph_data *priv = snd_soc_dai_get_drvdata(dai);
335
+ struct sti_uniperiph_data *priv = snd_soc_component_get_drvdata(component);
336336 struct uniperif *uni = priv->dai_data.uni;
337337 int ret;
338338
....@@ -370,12 +370,12 @@
370370
371371 static const struct snd_soc_dai_driver sti_uniperiph_dai_template = {
372372 .probe = sti_uniperiph_dai_probe,
373
- .suspend = sti_uniperiph_dai_suspend,
374
- .resume = sti_uniperiph_dai_resume
375373 };
376374
377375 static const struct snd_soc_component_driver sti_uniperiph_dai_component = {
378376 .name = "sti_cpu_dai",
377
+ .suspend = sti_uniperiph_suspend,
378
+ .resume = sti_uniperiph_resume
379379 };
380380
381381 static int sti_uniperiph_cpu_dai_of(struct device_node *node,
....@@ -426,10 +426,8 @@
426426 UNIPERIF_FIFO_DATA_OFFSET(uni);
427427
428428 uni->irq = platform_get_irq(priv->pdev, 0);
429
- if (uni->irq < 0) {
430
- dev_err(dev, "Failed to get IRQ resource\n");
429
+ if (uni->irq < 0)
431430 return -ENXIO;
432
- }
433431
434432 uni->type = dev_data->type;
435433