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

Commit 86cefc5f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: Ensure no pending works in bam drivers before init works"

parents 5a6433eb 52f68a17
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -1140,9 +1140,17 @@ int bam2bam_data_port_select(int portno)

	spin_lock_init(&port->port_lock_ul);
	spin_lock_init(&port->port_lock);

	if (!work_pending(&port->connect_w))
		INIT_WORK(&port->connect_w, bam2bam_data_connect_work);

	if (!work_pending(&port->disconnect_w))
		INIT_WORK(&port->disconnect_w, bam2bam_data_disconnect_work);

	if (!work_pending(&port->suspend_w))
		INIT_WORK(&port->suspend_w, bam2bam_data_suspend_work);

	if (!work_pending(&port->resume_w))
		INIT_WORK(&port->resume_w, bam2bam_data_resume_work);

	/* data ch */
@@ -1156,6 +1164,8 @@ int bam2bam_data_port_select(int portno)
	skb_queue_head_init(&d->rx_skb_q);
	skb_queue_head_init(&d->rx_skb_idle);
	INIT_LIST_HEAD(&d->rx_idle);

	if (!work_pending(&d->write_tobam_w))
		INIT_WORK(&d->write_tobam_w, bam_data_write_toipa);

	rndis_disconn_w = &port->disconnect_w;