Skip to contentSkip to conversation

ALSA: hda: generic: Remove obsolete call to ledtrig_audio_get

PATCH Applied Heiner Kallweit 2 participants 2 messages Jan 13, 2024 – Jan 15, 2024 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda: generic: Remove obsolete call to ledtrig_audio_get

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.

---
 sound/pci/hda/hda_generic.c | 1 -
 1 file changed, 1 deletion(-)
sound/pci/hda/hda_generic.c +0 -1
index bf685d012..de2a3d08c 100644
@@ -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);
Signature · 1 line
2.43.0
Applied
#1 lore raw
Quoted 7 lines · Heiner Kallweit

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.

Quoted 5 lines

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.

Thanks, applied now.

Takashi