mbox series

[0/7] ASoC: use snd_soc_dapm_to_component()

Message ID 87plhm9h5q.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
Headers show
Series ASoC: use snd_soc_dapm_to_component() | expand

Message

Kuninori Morimoto April 9, 2025, 2:56 a.m. UTC
Hi Mark

Current snd_soc_dapm_to_component() is using container_of(),
thus, caution is required to use it not to get strange pointer.

But, dapm has component pointer (= dapm->component), and we can simply use
it. If we use dapm->component instead of container_of(), above caution
is no longer needed.

Let's use dapm->component in snd_soc_dapm_to_component(), and use it.

Kuninori Morimoto (7):
  ASoC: soc-component: use dapm->component instead of container_of()
  ASoC: amd: use snd_soc_dapm_to_component()
  ASoC: sma1307: use snd_soc_dapm_to_component()
  ASoC: intel: use snd_soc_dapm_to_component()
  ASoC: mediatek: use snd_soc_dapm_to_component()
  ASoC: soc-dapm: use snd_soc_dapm_to_component()
  ASoC: soc-topology: use snd_soc_dapm_to_component()

 include/sound/soc-component.h             |  6 +--
 sound/soc/amd/acp/acp-mach-common.c       |  2 +-
 sound/soc/codecs/sma1307.c                | 32 ++++++-------
 sound/soc/intel/avs/control.c             |  2 +-
 sound/soc/mediatek/mt8195/mt8195-mt6359.c |  2 +-
 sound/soc/soc-dapm.c                      | 58 +++++++++++++++--------
 sound/soc/soc-topology.c                  |  3 +-
 7 files changed, 60 insertions(+), 45 deletions(-)