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

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

Merge "mhi: dev: uci: Handle TIOCMSET ioctl properly"

parents 8da9cb0a ef3a9a6a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -155,10 +155,14 @@ static long mhi_uci_ioctl(struct file *file,
	if (cmd == TIOCMGET) {
		spin_lock_bh(&uci_chan->lock);
		ret = uci_dev->tiocm;
		uci_dev->tiocm = 0;
		spin_unlock_bh(&uci_chan->lock);
	} else if (uci_dev->enabled) {
		ret = mhi_ioctl(mhi_dev, cmd, arg);
		if (!ret) {
			spin_lock_bh(&uci_chan->lock);
			uci_dev->tiocm = mhi_dev->tiocm;
			spin_unlock_bh(&uci_chan->lock);
		}
	}

	mutex_unlock(&uci_dev->mutex);