[PATCH v2 06/17] ASoC: simple-amplifier: Rename drv_event() function
From: Herve Codina
Date: Wed Apr 29 2026 - 03:50:14 EST
The drv_event() is used to handle power events related to the DRV item.
Later, with the support for gpio-audio-amp, this function will be
also used to handle power events related to the PGA item.
Also, more functions will be added in the driver and it is a common
usage to prefix functions based on the driver name.
Rename the drv_event() function to simple_amp_power_event() to follow
common usage and get rid of the 'drv' term.
Signed-off-by: Herve Codina <herve.codina@xxxxxxxxxxx>
---
sound/soc/codecs/simple-amplifier.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/simple-amplifier.c b/sound/soc/codecs/simple-amplifier.c
index 215318ff62fc..8f2daec55134 100644
--- a/sound/soc/codecs/simple-amplifier.c
+++ b/sound/soc/codecs/simple-amplifier.c
@@ -15,8 +15,8 @@ struct simple_amp {
struct gpio_desc *gpiod_enable;
};
-static int drv_event(struct snd_soc_dapm_widget *w,
- struct snd_kcontrol *control, int event)
+static int simple_amp_power_event(struct snd_soc_dapm_widget *w,
+ struct snd_kcontrol *control, int event)
{
struct snd_soc_component *c = snd_soc_dapm_to_component(w->dapm);
struct simple_amp *priv = snd_soc_component_get_drvdata(c);
@@ -42,7 +42,7 @@ static int drv_event(struct snd_soc_dapm_widget *w,
static const struct snd_soc_dapm_widget simple_amp_dapm_widgets[] = {
SND_SOC_DAPM_INPUT("INL"),
SND_SOC_DAPM_INPUT("INR"),
- SND_SOC_DAPM_OUT_DRV_E("DRV", SND_SOC_NOPM, 0, 0, NULL, 0, drv_event,
+ SND_SOC_DAPM_OUT_DRV_E("DRV", SND_SOC_NOPM, 0, 0, NULL, 0, simple_amp_power_event,
(SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD)),
SND_SOC_DAPM_OUTPUT("OUTL"),
SND_SOC_DAPM_OUTPUT("OUTR"),
--
2.53.0