]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: simple-amplifier: Rename drv_event() function
authorHerve Codina <herve.codina@bootlin.com>
Wed, 13 May 2026 08:16:50 +0000 (10:16 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 18 May 2026 16:44:06 +0000 (17:44 +0100)
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@bootlin.com>
Link: https://patch.msgid.link/20260513081702.317117-7-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/simple-amplifier.c

index 215318ff62fc65175751af2690200bf6672e493d..8f2daec55134dea2a8bdc8538363da5efec416d6 100644 (file)
@@ -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"),