ALSA: x86: Pass snd_intelhad object to helpers

For reducing the global variable reference, keep snd_intelhad object
in the context and pass it to each helper.  It's a preliminary change
for further cleanup.

This also includes the simplification of the probe procedure: the LPE
platform driver directly gets the created snd_intelhad object by
hdmi_audio_probe(), and passes it to each helper and destructor,
hdmi_audio_remove().  The hdmi_audio_probe() function doesn't call the
back-registration any longer, which is fairly useless.  The LPE
platform driver initializes the stuff instead at the right place, and
calls the wq after the object creation in the probe function itself.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai
2017-01-30 17:23:39 +01:00
rodzic 6f9ecc76f4
commit 79dda75a2c
5 zmienionych plików z 129 dodań i 128 usunięć

Wyświetl plik

@@ -648,7 +648,6 @@ struct hdmi_audio_event {
bool mid_hdmi_audio_is_busy(void *dev);
void mid_hdmi_audio_signal_event(enum had_event_type event);
int mid_hdmi_audio_setup(had_event_call_back audio_callbacks);
int mid_hdmi_audio_register(void *had_data);
int mid_hdmi_audio_read(u32 reg, u32 *val);
int mid_hdmi_audio_write(u32 reg, u32 val);