Fix error incompatible pointer type, warning: no previous prototype

This commit is contained in:
The-going
2025-03-11 21:03:18 +03:00
committed by Igor
parent 7553fdae73
commit bb6c41e221

View File

@@ -0,0 +1,105 @@
From 0d29e9fa4b11fd45bd4064a371baecb8e21e1610 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Tue, 11 Mar 2025 21:01:36 +0300
Subject: [PATCH] Fix: error: incompatible pointer type, warning: no previous
prototype
---
sound/soc/soc-core.c | 6 +++---
sound/soc/sunxi_v2/snd_sunxi_ahub.h | 7 +++++++
sound/soc/sunxi_v2/snd_sunxi_ahub_dam.h | 5 ++++-
sound/soc/sunxi_v2/snd_sunxi_mach.c | 4 ++--
sound/soc/sunxi_v2/snd_sunxi_mach.h | 3 +++
5 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index ec05135e25fa..798a2bae1698 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2629,7 +2629,7 @@ struct snd_soc_dai *snd_soc_register_dai(struct snd_soc_component *component,
{
struct device *dev = component->dev;
struct snd_soc_dai *dai;
- struct snd_soc_dai_ops *ops; /* REMOVE ME */
+ /* struct snd_soc_dai_ops *ops; REMOVE ME */
lockdep_assert_held(&client_mutex);
@@ -2658,7 +2658,7 @@ struct snd_soc_dai *snd_soc_register_dai(struct snd_soc_component *component,
if (!dai->name)
return NULL;
- /* REMOVE ME */
+ /* REMOVE ME
if (dai_drv->probe ||
dai_drv->remove ||
dai_drv->compress_new ||
@@ -2680,7 +2680,7 @@ struct snd_soc_dai *snd_soc_register_dai(struct snd_soc_component *component,
ops->remove_order = dai_drv->remove_order;
dai_drv->ops = ops;
- }
+ } */
dai->component = component;
dai->dev = dev;
diff --git a/sound/soc/sunxi_v2/snd_sunxi_ahub.h b/sound/soc/sunxi_v2/snd_sunxi_ahub.h
index b3c1cc592844..cd4be46b6ebf 100644
--- a/sound/soc/sunxi_v2/snd_sunxi_ahub.h
+++ b/sound/soc/sunxi_v2/snd_sunxi_ahub.h
@@ -64,4 +64,11 @@ struct sunxi_ahub_info {
unsigned int bclk_freq;
};
+int sunxi_loopback_debug_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol);
+int sunxi_loopback_debug_set(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol);
+int __init sunxi_ahub_dev_init(void);
+void __exit sunxi_ahub_dev_exit(void);
+
#endif /* __SND_SUNXI_AHUB_H */
diff --git a/sound/soc/sunxi_v2/snd_sunxi_ahub_dam.h b/sound/soc/sunxi_v2/snd_sunxi_ahub_dam.h
index b7679bf545e9..436742d87e8f 100644
--- a/sound/soc/sunxi_v2/snd_sunxi_ahub_dam.h
+++ b/sound/soc/sunxi_v2/snd_sunxi_ahub_dam.h
@@ -288,4 +288,7 @@ struct sunxi_ahub_clk_info {
extern int snd_soc_sunxi_ahub_mem_get(struct sunxi_ahub_mem_info *mem_info);
extern int snd_soc_sunxi_ahub_clk_get(struct sunxi_ahub_clk_info *clk_info);
-#endif /* __SND_SUNXI_AHUB_DAM_H */
\ No newline at end of file
+int __init sunxi_ahub_dam_dev_init(void);
+void __exit sunxi_ahub_dam_dev_exit(void);
+
+#endif /* __SND_SUNXI_AHUB_DAM_H */
diff --git a/sound/soc/sunxi_v2/snd_sunxi_mach.c b/sound/soc/sunxi_v2/snd_sunxi_mach.c
index ea73eced251e..74d276a2da92 100644
--- a/sound/soc/sunxi_v2/snd_sunxi_mach.c
+++ b/sound/soc/sunxi_v2/snd_sunxi_mach.c
@@ -43,8 +43,8 @@ static int asoc_simple_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(rtd->card);
- struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, rtd->num);
- struct simple_dai_props *dai_props = simple_priv_to_props(priv, rtd->num);
+ struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, rtd->id);
+ struct simple_dai_props *dai_props = simple_priv_to_props(priv, rtd->id);
struct asoc_simple_dai *dais = priv->dais;
unsigned int mclk;
unsigned int cpu_pll_clk, codec_pll_clk;
diff --git a/sound/soc/sunxi_v2/snd_sunxi_mach.h b/sound/soc/sunxi_v2/snd_sunxi_mach.h
index ab429c8841ab..6f9ea8ccf8b5 100644
--- a/sound/soc/sunxi_v2/snd_sunxi_mach.h
+++ b/sound/soc/sunxi_v2/snd_sunxi_mach.h
@@ -14,4 +14,7 @@
#include "snd_sunxi_mach_utils.h"
+int __init sunxi_soundcard_machine_dev_init(void);
+void __exit sunxi_soundcard_machine_dev_exit(void);
+
#endif /* __SND_SUNXI_MACH_H */
--
2.35.3