diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-01-30 17:38:00 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-02-03 17:23:15 +0100 |
commit | 437af8f2946231ee141bc2a8d37063a8bb6047b0 (patch) | |
tree | 46126d38d9c82ed105c6d062541e843257089a53 /sound/x86/intel_hdmi_lpe_audio.c | |
parent | dd895f2e9b013a5387372dbf3a7d8405aaeb494e (diff) | |
download | linux-437af8f2946231ee141bc2a8d37063a8bb6047b0.tar.gz |
ALSA: x86: Call event callback directly
Currently the driver calls the event callback stored in its ctx
pointer, but it's obviously inefficient. Replace it with the direct
calls.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/x86/intel_hdmi_lpe_audio.c')
-rw-r--r-- | sound/x86/intel_hdmi_lpe_audio.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/sound/x86/intel_hdmi_lpe_audio.c b/sound/x86/intel_hdmi_lpe_audio.c index 0c11d82eb99b..54cc30f034f3 100644 --- a/sound/x86/intel_hdmi_lpe_audio.c +++ b/sound/x86/intel_hdmi_lpe_audio.c @@ -44,7 +44,6 @@ static union otm_hdmi_eld_t hlpe_eld; struct hdmi_lpe_audio_ctx { int irq; void __iomem *mmio_start; - had_event_call_back had_event_callbacks; struct snd_intelhad *had; int tmds_clock_speed; bool dp_output; @@ -118,8 +117,7 @@ void mid_hdmi_audio_signal_event(enum had_event_type event) /* The handler is protected in the respective * event handlers to avoid races */ - if (ctx->had_event_callbacks) - (*ctx->had_event_callbacks)(event, ctx->had); + had_event_handler(event, ctx->had); } /* @@ -257,19 +255,6 @@ int mid_hdmi_audio_set_caps(enum had_caps_list set_element, return 0; } -int mid_hdmi_audio_setup(had_event_call_back audio_callbacks) -{ - struct hdmi_lpe_audio_ctx *ctx; - - ctx = platform_get_drvdata(hlpe_pdev); - - dev_dbg(&hlpe_pdev->dev, "%s: called\n", __func__); - - ctx->had_event_callbacks = audio_callbacks; - - return 0; -} - static void _had_wq(struct work_struct *work) { mid_hdmi_audio_signal_event(HAD_EVENT_HOT_PLUG); |