* [PATCH] ALSA: hda: generic: Remove obsolete call to ledtrig_audio_get
@ 2024-01-13 16:08 Heiner Kallweit
2024-01-15 11:43 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2024-01-13 16:08 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai; +Cc: linux-sound
Since 64f67b5240db ("leds: trigger: audio: Add an activate callback to
ensure the initial brightness is set") the audio triggers have an
activate callback which sets the LED brightness as soon as the
(default) trigger is bound to the LED device. So we can remove the
call to ledtrig_audio_get.
Positive side effect: We have no code dependency to ledtrig-audio any
longer, therefore, if built as module, it's no longer loaded if not
needed.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
sound/pci/hda/hda_generic.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index bf685d012..de2a3d08c 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -3946,7 +3946,6 @@ static int create_mute_led_cdev(struct hda_codec *codec,
cdev->max_brightness = 1;
cdev->default_trigger = micmute ? "audio-micmute" : "audio-mute";
cdev->brightness_set_blocking = callback;
- cdev->brightness = ledtrig_audio_get(idx);
cdev->flags = LED_CORE_SUSPENDRESUME;
err = led_classdev_register(&codec->core.dev, cdev);
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ALSA: hda: generic: Remove obsolete call to ledtrig_audio_get
2024-01-13 16:08 [PATCH] ALSA: hda: generic: Remove obsolete call to ledtrig_audio_get Heiner Kallweit
@ 2024-01-15 11:43 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2024-01-15 11:43 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: Jaroslav Kysela, Takashi Iwai, linux-sound
On Sat, 13 Jan 2024 17:08:54 +0100,
Heiner Kallweit wrote:
>
> Since 64f67b5240db ("leds: trigger: audio: Add an activate callback to
> ensure the initial brightness is set") the audio triggers have an
> activate callback which sets the LED brightness as soon as the
> (default) trigger is bound to the LED device. So we can remove the
> call to ledtrig_audio_get.
>
> Positive side effect: We have no code dependency to ledtrig-audio any
> longer, therefore, if built as module, it's no longer loaded if not
> needed.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Thanks, applied now.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-15 11:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-13 16:08 [PATCH] ALSA: hda: generic: Remove obsolete call to ledtrig_audio_get Heiner Kallweit
2024-01-15 11:43 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox