@@ -23,6 +23,7 @@
#include <sound/hda_register.h>
static struct i915_audio_component *hdac_acomp;
+static DECLARE_COMPLETION(acomp_bound);
/**
* snd_hdac_set_codec_wakeup - Enable / disable HDMI/DP codec wakeup
@@ -284,6 +285,7 @@ static int hdac_component_master_bind(struct device *dev)
goto out_unbind;
}
+ complete_all(&acomp_bound);
return 0;
out_unbind:
@@ -382,11 +384,8 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
if (ret < 0)
goto out_err;
- /*
- * Atm, we don't support deferring the component binding, so make sure
- * i915 is loaded and that the binding successfully completes.
- */
request_module("i915");
+ wait_for_completion_timeout(&acomp_bound, 10000); /* 10s timeout */
if (!acomp->ops) {
ret = -ENODEV;