|
@@ -1534,21 +1534,20 @@ static void hdac_hdmi_eld_notify_cb(void *aptr, int port, int pipe)
|
|
pin->mst_capable = false;
|
|
pin->mst_capable = false;
|
|
/* if not MST, default is port[0] */
|
|
/* if not MST, default is port[0] */
|
|
hport = &pin->ports[0];
|
|
hport = &pin->ports[0];
|
|
- goto out;
|
|
|
|
} else {
|
|
} else {
|
|
for (i = 0; i < pin->num_ports; i++) {
|
|
for (i = 0; i < pin->num_ports; i++) {
|
|
pin->mst_capable = true;
|
|
pin->mst_capable = true;
|
|
if (pin->ports[i].id == pipe) {
|
|
if (pin->ports[i].id == pipe) {
|
|
hport = &pin->ports[i];
|
|
hport = &pin->ports[i];
|
|
- goto out;
|
|
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (hport)
|
|
|
|
+ hdac_hdmi_present_sense(pin, hport);
|
|
}
|
|
}
|
|
|
|
|
|
-out:
|
|
|
|
- if (pin && hport)
|
|
|
|
- hdac_hdmi_present_sense(pin, hport);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
static struct i915_audio_component_audio_ops aops = {
|
|
static struct i915_audio_component_audio_ops aops = {
|
|
@@ -1998,7 +1997,7 @@ static int hdac_hdmi_dev_remove(struct hdac_ext_device *edev)
|
|
struct hdac_hdmi_pin *pin, *pin_next;
|
|
struct hdac_hdmi_pin *pin, *pin_next;
|
|
struct hdac_hdmi_cvt *cvt, *cvt_next;
|
|
struct hdac_hdmi_cvt *cvt, *cvt_next;
|
|
struct hdac_hdmi_pcm *pcm, *pcm_next;
|
|
struct hdac_hdmi_pcm *pcm, *pcm_next;
|
|
- struct hdac_hdmi_port *port;
|
|
|
|
|
|
+ struct hdac_hdmi_port *port, *port_next;
|
|
int i;
|
|
int i;
|
|
|
|
|
|
snd_soc_unregister_codec(&edev->hdac.dev);
|
|
snd_soc_unregister_codec(&edev->hdac.dev);
|
|
@@ -2008,8 +2007,9 @@ static int hdac_hdmi_dev_remove(struct hdac_ext_device *edev)
|
|
if (list_empty(&pcm->port_list))
|
|
if (list_empty(&pcm->port_list))
|
|
continue;
|
|
continue;
|
|
|
|
|
|
- list_for_each_entry(port, &pcm->port_list, head)
|
|
|
|
- port = NULL;
|
|
|
|
|
|
+ list_for_each_entry_safe(port, port_next,
|
|
|
|
+ &pcm->port_list, head)
|
|
|
|
+ list_del(&port->head);
|
|
|
|
|
|
list_del(&pcm->head);
|
|
list_del(&pcm->head);
|
|
kfree(pcm);
|
|
kfree(pcm);
|