Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4b260cf authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: qcom: bam_dmux: Abort open/close cmd during SSR"

parents 13404afb a8455fed
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1122,6 +1122,12 @@ int msm_bam_dmux_open(uint32_t id, void *priv,
		kfree(hdr);
		return -ENODEV;
	}
	if (in_global_reset) {
		BAM_DMUX_LOG("%s: In SSR... ch_id[%d]\n", __func__, id);
		spin_unlock_irqrestore(&bam_ch[id].lock, flags);
		kfree(hdr);
		return -ENODEV;
	}

	bam_ch[id].notify = notify;
	bam_ch[id].priv = priv;
@@ -1200,6 +1206,12 @@ int msm_bam_dmux_close(uint32_t id)
		return 0;
	}

	if (in_global_reset) {
		BAM_DMUX_LOG("%s: In SSR... ch_id[%d]\n", __func__, id);
		read_unlock(&ul_wakeup_lock);
		return 0;
	}

	hdr = kmalloc(sizeof(struct bam_mux_hdr), GFP_ATOMIC);
	if (hdr == NULL) {
		read_unlock(&ul_wakeup_lock);